[PATCH] Fix calculation of smallest PV's size in the lvm dialog. (#493753)

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

 



This was causing failures to set large(r) extent size with small(er) VGs.
---
 iw/lvm_dialog_gui.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py
index e07abf3..e325574 100644
--- a/iw/lvm_dialog_gui.py
+++ b/iw/lvm_dialog_gui.py
@@ -79,12 +79,12 @@ class VolumeGroupEditor:
         pvlist = self.getSelectedPhysicalVolumes()
 	for pv in pvlist:
             try:
-                pesize = int(self.peCombo.get_active_value())
+                pesize = int(self.peCombo.get_active_value()) / 1024.0
             except:
                 pesize = self.vg.peSize
 
             # FIXME: move this logic into a property of LVMVolumeGroupDevice
-            pvsize = lvm.clampSize(pv.size, pesize) - int(pesize/1024)
+            pvsize = max(0, lvm.clampSize(pv.size, pesize) - pesize)
 	    if first:
 		minpvsize = pvsize
 		first = 0
-- 
1.6.0.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