[PATCH 3/7] Handle SameSizeSet growth trimming when all members are too large.

David Lehman dlehman at redhat.com
Fri Aug 24 20:21:01 UTC 2012


---
 pyanaconda/storage/partitioning.py |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/storage/partitioning.py b/pyanaconda/storage/partitioning.py
index 968389e..f057bf7 100644
--- a/pyanaconda/storage/partitioning.py
+++ b/pyanaconda/storage/partitioning.py
@@ -1653,10 +1653,15 @@ def manageSizeSets(size_sets, chunks):
                 # SameSizeSet members all have the same size as the smallest
                 # member
                 requests = [requests_by_device[d] for d in ss.devices]
-                min_growth = min([r.growth for r in requests])
+                _min_growth = min([r.growth for r in requests])
+                log.debug("set: %s %d" % ([d.name for d in ss.devices], ss.size))
+                log.debug("min growth is %d" % _min_growth)
                 for request in requests:
+                    chunk = chunks_by_request[request]
+                    _max_growth = chunk.sizeToLength(ss.size) - request.base
+                    log.debug("max growth for %s is %d" % (request, _max_growth))
+                    min_growth = max(min(_min_growth, _max_growth), 0)
                     if request.growth > min_growth:
-                        chunk = chunks_by_request[request]
                         extra = request.growth - min_growth
                         reclaimed[chunk] += extra
                         chunk.reclaim(request, extra)
-- 
1.7.7.6



More information about the anaconda-patches mailing list