Re: [PATCH] Move disabling of cylinder alignment to disklabel format

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

 



Ack.

On Tue, 2010-03-16 at 22:10 +0100, Hans de Goede wrote:
> This way not only the disk we are using during partitioning, but
> also the disk we use when executing actions (disklabel._origPartedDisk)
> has cylinder alignment disabled.
> 
> This does not change the end result as we always specify an exactConstraint
> anyways, but still this is the right thing to do.
> ---
>  storage/formats/disklabel.py |    4 ++++
>  storage/partitioning.py      |    5 -----
>  2 files changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/storage/formats/disklabel.py b/storage/formats/disklabel.py
> index 62fde7e..347befb 100644
> --- a/storage/formats/disklabel.py
> +++ b/storage/formats/disklabel.py
> @@ -142,6 +142,10 @@ class DiskLabel(DeviceFormat):
>              else:
>                  self._partedDisk = self.freshPartedDisk()
>  
> +            # turn off cylinder alignment
> +            if self._partedDisk.isFlagAvailable(parted.DISK_CYLINDER_ALIGNMENT):
> +                self._partedDisk.unsetFlag(parted.DISK_CYLINDER_ALIGNMENT)
> +
>          return self._partedDisk
>  
>      @property
> diff --git a/storage/partitioning.py b/storage/partitioning.py
> index 939cf96..b615ecc 100644
> --- a/storage/partitioning.py
> +++ b/storage/partitioning.py
> @@ -786,11 +786,6 @@ def doPartitioning(storage, exclusiveDisks=None):
>      if bootDev:
>          bootDev.req_bootable = True
>  
> -    # turn off cylinder alignment
> -    for partedDisk in [d.format.partedDisk for d in disks]:
> -        if partedDisk.isFlagAvailable(parted.DISK_CYLINDER_ALIGNMENT):
> -            partedDisk.unsetFlag(parted.DISK_CYLINDER_ALIGNMENT)
> -
>      removeNewPartitions(disks, partitions)
>      free = getFreeRegions(disks)
>      allocatePartitions(storage, disks, partitions, free)


_______________________________________________
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