FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 03-16-2010, 08:34 PM
Hans de Goede
 
Default Properly align the first partition we create (#574220)

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)
new_partitions = []
for p in chunk.requests:
ptype = p.partition.partedPartition.type
--
1.7.0

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-17-2010, 08:07 AM
Ales Kozumplik
 
Default Properly align the first partition we create (#574220)

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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-18-2010, 11:46 AM
David Lehman
 
Default Properly align the first partition we create (#574220)

On Tue, 2010-03-16 at 22:34 +0100, 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.

Looks okay as long as it's only an issue when some partitions are
growable.

Dave

> ---
> 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)
> new_partitions = []
> for p in chunk.requests:
> ptype = p.partition.partedPartition.type


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 10:25 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org