[PATCH 2/2] growPartitions: Change op_func (back to) add when an iteration succeeds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently when an iteration fails we will switch from growing to
shrinking our req_size, but we neglect to switch back to growing when we
succeed. So if for example orig_sectors + 1/2 max_grow would fail, we
would try orig_sectors + 1/4 max_grow and even if that succeeds we would
then try orig_sectors + 1/8 max_grow (and keep that) instead of trying
orig_sectors + 3/8 max_grow.
---
 storage/partitioning.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/storage/partitioning.py b/storage/partitioning.py
index 6328de1..e8fee31 100644
--- a/storage/partitioning.py
+++ b/storage/partitioning.py
@@ -987,6 +987,7 @@ def growPartitions(disks, partitions):
                     op_func = sub
                     last_outcome = False
                 else:
+                    op_func = add
                     last_good_size = part.req_size
                     last_outcome = True
 
-- 
1.6.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux