[PATCH 3/8] Fix basis for precentage growth of lvm requests.

David Lehman dlehman at redhat.com
Thu Sep 18 14:59:00 UTC 2014


On 09/16/2014 11:41 AM, David Lehman wrote:
> It's supposed to be a percentage of the free space in the vg after
> allocating requests at their base sizes.
>
> Resolves: rhbz#1116435

I am withdrawing this patch. It changes blivet to match the 
documentation. In my opinion both blivet and the documentation are 
broken, so I'm going to fix it all instead. That means the percent 
option will specify the size as a percentage of free space in the vg 
(after allocating other requests at their base sizes). The size and 
percent options will become mutually exclusive.

David

> ---
>   blivet/partitioning.py | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/blivet/partitioning.py b/blivet/partitioning.py
> index bd7a0a8..8943d66 100644
> --- a/blivet/partitioning.py
> +++ b/blivet/partitioning.py
> @@ -1685,11 +1685,12 @@ class VGChunk(Chunk):
>           self.sortRequests()
>
>           # grow the percentage-based requests
> +        last_pool = self.pool
>           for req in self.requests:
>               if req.done or not req.device.req_percent:
>                   continue
>
> -            growth = int(req.device.req_percent * 0.01 * self.length)# truncate
> +            growth = int(req.device.req_percent * 0.01 * last_pool)# truncate
>               req.growth += growth
>               self.pool -= growth
>               log.debug("adding %d (%s) to %d (%s)",
>



More information about the anaconda-patches mailing list