Re: [PATCH] Allow existing LVs with filesystems to be resized (#490913)

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

 



On Wed, 2009-04-29 at 17:24 -1000, David Cantrell wrote:
> If you have an existing disk layout and choose custom partitioning and
> want to resize an existing logical volume and filesystem, targetSize was
> getting the new size value before an ActionFormatResize() was created
> for the device, which resulted in a traceback.

Looks okay to me.

> ---
>  iw/lvm_dialog_gui.py    |    5 ++---
>  storage/deviceaction.py |    2 +-
>  2 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py
> index f1c2596..a24e1ee 100644
> --- a/iw/lvm_dialog_gui.py
> +++ b/iw/lvm_dialog_gui.py
> @@ -729,7 +729,6 @@ class VolumeGroupEditor:
>                  if self.fsoptionsDict.has_key("resizecb") and self.fsoptionsDict["resizecb"].get_active():
>                      targetSize = self.fsoptionsDict["resizesb"].get_value_as_int()
>                      templv.targetSize = targetSize
> -                    format.targetSize = targetSize
>  
>                  templv.format = format
>  
> @@ -1071,8 +1070,8 @@ class VolumeGroupEditor:
>                          actions.append(ActionMigrateFormat(origlv))
>  
>                      if lv.format.resizable and \
> -                       lv.format.targetSize != lv.format.currentSize:
> -                        new_size = lv.format.targetSize
> +                       lv.targetSize != lv.format.currentSize:
> +                        new_size = lv.targetSize
>                          actions.append(ActionResizeFormat(origlv, new_size))
>                  elif lv.format.type:
>                      log.debug("new format: %s" % lv.format.type)
> diff --git a/storage/deviceaction.py b/storage/deviceaction.py
> index b462108..61e9aa4 100644
> --- a/storage/deviceaction.py
> +++ b/storage/deviceaction.py
> @@ -342,7 +342,7 @@ class ActionResizeFormat(DeviceAction):
>      obj = ACTION_OBJECT_FORMAT
>  
>      def __init__(self, device, newsize):
> -        if device.targetSize == newsize:
> +        if device.format.targetSize == newsize:
>              raise ValueError("new size same as old size")
>  
>          DeviceAction.__init__(self, device)

_______________________________________________
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