[PATCH 3/8] Fix basis for precentage growth of lvm requests.

David Lehman dlehman at redhat.com
Tue Sep 16 16:41:06 UTC 2014


It's supposed to be a percentage of the free space in the vg after
allocating requests at their base sizes.

Resolves: rhbz#1116435
---
 blivet/partitioning.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/blivet/partitioning.py b/blivet/partitioning.py
index bd7a0a8..8943d66 100644
--- a/blivet/partitioning.py
+++ b/blivet/partitioning.py
@@ -1685,11 +1685,12 @@ class VGChunk(Chunk):
         self.sortRequests()
 
         # grow the percentage-based requests
+        last_pool = self.pool
         for req in self.requests:
             if req.done or not req.device.req_percent:
                 continue
 
-            growth = int(req.device.req_percent * 0.01 * self.length)# truncate
+            growth = int(req.device.req_percent * 0.01 * last_pool)# truncate
             req.growth += growth
             self.pool -= growth
             log.debug("adding %d (%s) to %d (%s)",
-- 
1.9.3



More information about the anaconda-patches mailing list