Re: [PATCH 1/2] partedPartition can be None while growing partitions (#495076)

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

 



This looks good,  though I would prefer a test before the commit :)
On Thu, Apr 09, 2009 at 08:56:54PM +0200, Hans de Goede wrote:
> This patch changes us from attempting to use orig_sectors +
> 1/2, 3/4, 7/8 of max_sectors as partition size to using
> orig_sectors + 1/2, 3/4, 7/8 of grow_sectors as partition
> size, this way we do not need to check that we grow beyond
> max_sectors, because we can no longer do that.
> ---
>  storage/partitioning.py |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/storage/partitioning.py b/storage/partitioning.py
> index 5fba2e1..6328de1 100644
> --- a/storage/partitioning.py
> +++ b/storage/partitioning.py
> @@ -970,11 +970,10 @@ def growPartitions(disks, partitions):
>              log.debug("starting binary search: size=%d max_size=%d" % (part.req_size, max_size))
>              count = 0
>              op_func = add
> -            increment = max_sectors
> +            increment = max_grow
>              last_good_size = part.req_size
>              last_outcome = None
> -            while (part.partedPartition.geometry.length < max_sectors and
> -                   count < 3):
> +            while count < 3:
>                  last_size = part.req_size
>                  increment /= 2
>                  req_sectors = op_func(req_sectors, increment)
> -- 
> 1.6.2
> 
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

-- 
Joel Andres Granados
Brno, Czech Republic, Red Hat.

_______________________________________________
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