[PATCH 1/2] Use parted.Device's sectorSize attr instead of physicalSectorSize.

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

 



---
 storage/partitioning.py |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/storage/partitioning.py b/storage/partitioning.py
index b1b4899..80a2c7f 100644
--- a/storage/partitioning.py
+++ b/storage/partitioning.py
@@ -659,7 +659,7 @@ def addPartition(disk, free, part_type, size):
         end = free.end
     else:
         # size is in MB
-        length = sizeToSectors(size, disk.device.physicalSectorSize)
+        length = sizeToSectors(size, disk.device.sectorSize)
         end = start + length
         if not _a.isAligned(free, end):
             end = _a.alignNearest(free, end)
@@ -868,7 +868,7 @@ def allocatePartitions(disks, partitions, freespace):
         # loop through disks
         for _disk in req_disks:
             disklabel = disklabels[_disk.path]
-            sectorSize = disklabel.partedDevice.physicalSectorSize
+            sectorSize = disklabel.partedDevice.sectorSize
             best = None
             current_free = free
 
@@ -951,7 +951,7 @@ def allocatePartitions(disks, partitions, freespace):
 
                         # grow all growable requests
                         disk_growth = 0
-                        disk_sector_size = disklabels[disk_path].partedDevice.physicalSectorSize
+                        disk_sector_size = disklabels[disk_path].partedDevice.sectorSize
                         for chunk in chunks:
                             chunk.growRequests()
                             # record the growth for this layout
@@ -1077,7 +1077,7 @@ class Request(object):
         self.done = not partition.req_grow  # can we grow this request more?
         self.base = partition.partedPartition.geometry.length   # base sectors
 
-        sector_size = partition.partedPartition.disk.device.physicalSectorSize
+        sector_size = partition.partedPartition.disk.device.sectorSize
 
         if partition.req_grow:
             max_size = partition.req_max_size
@@ -1129,7 +1129,7 @@ class Chunk(object):
         """
         self.geometry = geometry            # parted.Geometry
         self.pool = self.geometry.length    # free sector count
-        self.sectorSize = self.geometry.device.physicalSectorSize
+        self.sectorSize = self.geometry.device.sectorSize
         self.base = 0                       # sum of growable requests' base
                                             # sizes, in sectors
         self.requests = []                  # list of Request instances
@@ -1328,7 +1328,7 @@ def growPartitions(disks, partitions, free):
 
     for disk in disks:
         log.debug("growing partitions on %s" % disk.name)
-        sector_size = disk.format.partedDevice.physicalSectorSize
+        sector_size = disk.format.partedDevice.sectorSize
         _a = getDiskAlignment(disk.format.partedDisk)
 
         # find any extended partition on this disk
-- 
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