Re: [PATCH] Use size instead of currentSize when comparing lv sizes

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

 



On Thu, 2009-04-16 at 00:30 +0200, Hans de Goede wrote:
> parted and lvm have a different idea of the exact size of an LV, so
> when using currentSize to see if we need to resize, we will always
> create a ResizeAction, which will later on fail as "lvm lvresize"
> returns an error status if the requested resize is a nop.
> 
> So use size instead, this is safe as we never change the size of
> existing lv's.

Looks okay.

> 
> This fixes a traceback with a lvmresize exception when trying to use
> an existing LV during install without changing its size.
> ---
>  iw/lvm_dialog_gui.py |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py
> index 0089e96..ef52903 100644
> --- a/iw/lvm_dialog_gui.py
> +++ b/iw/lvm_dialog_gui.py
> @@ -1057,7 +1057,7 @@ class VolumeGroupEditor:
>                          origlv = _lv
>                          break
>  
> -                if lv.resizable and lv.targetSize != origlv.currentSize:
> +                if lv.resizable and lv.targetSize != origlv.size:
>                      actions.append(ActionResizeDevice(origlv, lv.targetSize))
>  
>                  if lv.format.exists:

_______________________________________________
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