Re: [PATCH] Properly align the first partition we create (#574220)

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

 



On 03/16/2010 10:34 PM, Hans de Goede wrote:
The first partition (within a block of freespace) that anaconda creates does
not get properly aligned. For example on an empty disk anaconda starts the
first partition at sector 63 rather then at sector 2048.

This is caused by us no longer aligning freespace regions, combined
with growPartitions() not aligning the start address of a freespace chunk
before use.
---
  storage/partitioning.py |    3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/storage/partitioning.py b/storage/partitioning.py
index b615ecc..5f1455c 100644
--- a/storage/partitioning.py
+++ b/storage/partitioning.py
@@ -1381,6 +1381,9 @@ def growPartitions(disks, partitions, free):
              # recalculate partition geometries
              disklabel = disk.format
              start = chunk.geometry.start
+            # align start sector as needed
+            if not disklabel.alignment.isAligned(chunk.geometry, start):
+                start = disklabel.alignment.alignUp(chunk.geometry, start)

Looks ACK to me.

_______________________________________________
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