[rhel6-branch] lvm: check resizing against format's targetSize (#580171).

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

 



lv.format.currentSize remains on the original value all the time. This
means that when the user resize the LV once, currentSize stays the same
and the test for change in lvm_dialog_gui.py always succeeds every time
the user reopens the LV edit dialog. This causes a traceback just below,
in ActionResizeFormat.
---
 iw/lvm_dialog_gui.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py
index b45c263..c06855b 100644
--- a/iw/lvm_dialog_gui.py
+++ b/iw/lvm_dialog_gui.py
@@ -1152,10 +1152,10 @@ class VolumeGroupEditor:
                     # check the lv's format also, explicitly, in case it is
                     # encrypted. in this case we must check them both.
                     if format.resizable and lv.format.resizable and \
-                       lv.targetSize != format.currentSize and \
-                       usedev.format.exists:
-                        new_size = lv.targetSize
-                        actions.append(ActionResizeFormat(usedev, new_size))
+                            lv.targetSize != format.targetSize and \
+                            usedev.format.exists:
+                        log.debug("resizing format on %s to %d" % (usedev.lvname, lv.targetSize))
+                        actions.append(ActionResizeFormat(usedev, lv.targetSize))
                 elif lv.format.type:
                     log.debug("new format: %s" % lv.format.type)
                     # destroy old format and any associated luks devices
-- 
1.6.6

_______________________________________________
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