summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2010-02-22 14:36:28 -0600
committerDavid Lehman <dlehman@redhat.com>2010-02-22 17:09:27 -0600
commit34b4759a76db7e92b2f80e2af0225d335e3a2a09 (patch)
tree14cf3323abbe58a9237e89393def7b42a87d0d23 /storage
parent4fe8719d80c595a92b99ee1e90af7ba5eee6d1e1 (diff)
downloadanaconda-34b4759a76db7e92b2f80e2af0225d335e3a2a09.tar.gz
anaconda-34b4759a76db7e92b2f80e2af0225d335e3a2a09.tar.xz
anaconda-34b4759a76db7e92b2f80e2af0225d335e3a2a09.zip
Don't align free space geometries in getFreeRegions. (#565692)
Diffstat (limited to 'storage')
-rw-r--r--storage/partitioning.py21
1 files changed, 1 insertions, 20 deletions
diff --git a/storage/partitioning.py b/storage/partitioning.py
index 70cd75d77..00e655fea 100644
--- a/storage/partitioning.py
+++ b/storage/partitioning.py
@@ -723,31 +723,12 @@ def getFreeRegions(disks):
disks -- list of parted.Disk instances
- Return value is a list of aligned parted.Geometry instances.
+ Return value is a list of unaligned parted.Geometry instances.
"""
free = []
for disk in disks:
for f in disk.format.partedDisk.getFreeSpaceRegions():
- # device alignment fixups
- if not disk.format.alignment.isAligned(f, f.start):
- try:
- f.start = disk.format.alignment.alignNearest(f, f.start)
- except ArithmeticError, e:
- # This happens when the free region is too small to create
- # an aligned partition in it, ie the freespace between the
- # mbr and the first aligned partition
- continue
-
- if not disk.format.endAlignment.isAligned(f, f.end):
- try:
- f.end = disk.format.endAlignment.alignNearest(f, f.end)
- except ArithmeticError, e:
- # This happens when the free region is too small to create
- # an aligned partition in it, ie the freespace after the
- # last aligned partition
- continue
-
if f.length > 0:
free.append(f)