p.s. 1) I'm going to bed / sleep, feel free to push this if you want, note it is untested 2) I've also looked at 495077, The way to fix this one seems to be to replace size by req_size at line storage/partitioning.py: 375: ret -= cmp(part1.size, part2.size) * 100 More in general the deallocating code in allocatePartitions which currently sets the partedPartition to None, should also set the partitions.disk to None, and partitionDevice._setDisk should be fixed to handle it being set to None. Also it would be good to fix partitionDevice._getSize to check for partedPartition != None instead of for parents len. On 04/09/2009 08:56 PM, Hans de Goede wrote:
This patch changes us from attempting to use orig_sectors + 1/2, 3/4, 7/8 of max_sectors as partition size to using orig_sectors + 1/2, 3/4, 7/8 of grow_sectors as partition size, this way we do not need to check that we grow beyond max_sectors, because we can no longer do that. --- storage/partitioning.py | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/storage/partitioning.py b/storage/partitioning.py index 5fba2e1..6328de1 100644 --- a/storage/partitioning.py +++ b/storage/partitioning.py @@ -970,11 +970,10 @@ def growPartitions(disks, partitions): log.debug("starting binary search: size=%d max_size=%d" % (part.req_size, max_size)) count = 0 op_func = add - increment = max_sectors + increment = max_grow last_good_size = part.req_size last_outcome = None - while (part.partedPartition.geometry.length< max_sectors and - count< 3): + while count< 3: last_size = part.req_size increment /= 2 req_sectors = op_func(req_sectors, increment)
_______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list