[PATCH 3/5] Fix units for fs min size padding.

Anne Mulhern amulhern at redhat.com
Mon Nov 17 23:41:47 UTC 2014





----- Original Message -----
> From: "David Lehman" <dlehman at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Monday, November 17, 2014 2:36:06 PM
> Subject: [PATCH 3/5] Fix units for fs min size padding.
> 
> ---
>  blivet/formats/fs.py | 16 ++++++++++------
>  1 file changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
> index 3cffb42..1139547 100644
> --- a/blivet/formats/fs.py
> +++ b/blivet/formats/fs.py
> @@ -983,11 +983,13 @@ class Ext2FS(FS):
>                  size = _size
>                  orig_size = size
>                  log.debug("size=%s, current=%s", size, self.currentSize)
> -                size = min(size * Decimal('1.1'), size + 500,
> self.currentSize)
> +                size = min(size * Decimal('1.1'),
> +                           size + Size("500 MiB"),
> +                           self.currentSize)
>                  if orig_size < size:
> -                    log.debug("padding min size from %d up to %d",
> orig_size, size)
> +                    log.debug("padding min size from %s up to %s",
> orig_size, size)
>                  else:
> -                    log.debug("using current size %d as min size", size)
> +                    log.debug("using current size %s as min size", size)
>  
>          self._minInstanceSize = size
>  
> @@ -1386,11 +1388,13 @@ class NTFS(FS):
>                  log.warning("Unable to discover minimum size of filesystem "
>                              "on %s", self.device)
>              else:
> -                size = min(minSize * Decimal('1.1'), minSize + 500,
> self.currentSize)
> +                size = min(minSize * Decimal('1.1'),
> +                           minSize + Size("500 MiB"),
> +                           self.currentSize)
>                  if minSize < size:
> -                    log.debug("padding min size from %d up to %d", minSize,
> size)
> +                    log.debug("padding min size from %s up to %s", minSize,
> size)
>                  else:
> -                    log.debug("using current size %d as min size", size)
> +                    log.debug("using current size %s as min size", size)
>  
>          self._minInstanceSize = size
>  
> --
> 1.9.3
> 
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 

These all look like changes for the better, ack.

- mulhern


More information about the anaconda-patches mailing list