diff options
author | David Lehman <dlehman@redhat.com> | 2009-03-16 21:49:31 -0500 |
---|---|---|
committer | David Lehman <dlehman@redhat.com> | 2009-03-16 21:49:31 -0500 |
commit | aff13e4bd26175345ca0545227916f6af40411eb (patch) | |
tree | f9401c2b1465d5cf022cec37c3bed9afcebc20ae | |
parent | e23392f8d4aba295ce67f06193ff0bacc11da6e9 (diff) | |
download | anaconda-aff13e4bd26175345ca0545227916f6af40411eb.tar.gz anaconda-aff13e4bd26175345ca0545227916f6af40411eb.tar.xz anaconda-aff13e4bd26175345ca0545227916f6af40411eb.zip |
Don't use disk.maximizePartition anymore.
We are doing a fine job of maximizing things on our own, and
maximizePartitions is actually shrinking our partitions in an
effort to make sure they are cylinder-aligned. Bottom line,
it's not doing anything useful. If we decide to start making
all partitions cylinder-aligned, we will want to do it in
another way besides calling maximizePartitions, and presumably
our current accuracy will be preserved. If not, we can always
bring it back.
-rw-r--r-- | storage/partitioning.py | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/storage/partitioning.py b/storage/partitioning.py index c10a3d2eb..8243080de 100644 --- a/storage/partitioning.py +++ b/storage/partitioning.py @@ -932,29 +932,6 @@ def growPartitions(disks, partitions): except PartitioningError, e: raise PartitioningError("failed to grow partitions") - # Maximize partitions, we do this after growing all partitions - # as some partitions may grow unlimited, and we don't want them - # eating up the entire disk when we still need to grow others - for part in growable: - constraint = parted.Constraint(device=disk.partedDisk.device) - - # don't grow beyond the request's maximum size - if part.req_max_size: - max_sect = (part.req_max_size * (1024 * 1024)) / sectorSize - if constraint.maxSize > max_sect: - constraint.maxSize = max_sect - - # don't grow beyond the resident filesystem's max size - if part.format.maxSize > 0: - max_sect = (part.format.maxSize * (1024 * 1024)) / sectorSize - if constraint.maxSize > max_sect: - constraint.maxSize = max_sect - - disk.partedDisk.maximizePartition(part.partedPartition, constraint) - log.debug("grew partition %s to %dMB" % (part.name, - part.partedPartition.getSize())) - log.debug("the disk's copy is %dMB" % disk.partedDisk.getPartitionByPath(part.path).getSize()) - # reset all requests to their original requested size for part in partitions: if part.exists: |