[blivet][rhel7][PATCH] More fixes for alignment-related partition allocation failures.

Anne Mulhern amulhern at redhat.com
Mon Jan 26 14:10:59 UTC 2015





----- Original Message -----
> From: "David Lehman" <dlehman at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Friday, January 23, 2015 12:29:47 PM
> Subject: [blivet][rhel7][PATCH] More fixes for alignment-related partition	allocation failures.
> 
> Commit dcfd06a7cdb7b9 caused an UnboundLocalError, which this fixes.
> 
> Also, handle alignment-related failures when no growable requests are
> being allocated.
> 
> Related: rhbz#1167292
> ---
>  blivet/partitioning.py | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/blivet/partitioning.py b/blivet/partitioning.py
> index f33d78d..3f0f15d 100644
> --- a/blivet/partitioning.py
> +++ b/blivet/partitioning.py
> @@ -1122,6 +1122,7 @@ def allocatePartitions(storage, disks, partitions,
> freespace):
>  

<-- SNIP -->

The deepest level of nesting in this method is 10 and it seems to be about 300 lines long.
The deepest level of nesting in this patch is 8.
I don't have any objections to this patch itself,
but I do feel that that the level of nesting and the length lead to these kinds of errors,
and probably some others,
and should be corrected sometime by some (careful) refactoring, if this method is going to
stay around.

- mulhern


More information about the anaconda-patches mailing list