[PATCH] Don't use disk.maximizePartition anymore.

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

 



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.
---
 storage/partitioning.py |   23 -----------------------
 1 files changed, 0 insertions(+), 23 deletions(-)

diff --git a/storage/partitioning.py b/storage/partitioning.py
index c10a3d2..8243080 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:
-- 
1.6.0.6

_______________________________________________
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