[PATCH] Avoid exception when aligned start and end are crossed over
Anne Mulhern
amulhern at redhat.com
Tue Jan 6 21:23:06 UTC 2015
Ack.
- mulhern
----- Original Message -----
> From: "David Lehman" <dlehman at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Cc: "Alexander Lakhin" <exclusion at gmail.com>
> Sent: Tuesday, January 6, 2015 3:17:24 PM
> Subject: [PATCH] Avoid exception when aligned start and end are crossed over
>
> From: Alexander Lakhin <exclusion at gmail.com>
>
> (cherry picked from commit 178c933748692bfae1134e5db4ade014affabf04)
>
> Resolves: rhbz#1167233
> ---
> blivet/partitioning.py | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/blivet/partitioning.py b/blivet/partitioning.py
> index 9f6eea8..2d2777b 100644
> --- a/blivet/partitioning.py
> +++ b/blivet/partitioning.py
> @@ -1780,9 +1780,13 @@ def getDiskChunks(disk, partitions, free):
> # also check that the resulting aligned geometry has a non-zero
> length.
> # (It is possible that both will align to the same sector in a small
> # enough region.)
> + al_start = disk.format.alignment.alignUp(f, f.start)
> + al_end = disk.format.endAlignment.alignDown(f, f.end)
> + if al_start >= al_end:
> + continue
> geom = parted.Geometry(device=f.device,
> - start=disk.format.alignment.alignUp(f,
> f.start),
> - end=disk.format.endAlignment.alignDown(f,
> f.end))
> + start=al_start,
> + end=al_end)
> if geom.length < disk.format.alignment.grainSize:
> continue
>
> --
> 1.9.3
>
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>
More information about the anaconda-patches
mailing list