[PATCH 04/10] Fix return value of get_pv_space for size of 0.

David Lehman dlehman at redhat.com
Tue Jun 25 20:37:54 UTC 2013


---
 blivet/devicelibs/lvm.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/blivet/devicelibs/lvm.py b/blivet/devicelibs/lvm.py
index eaafad1..7ac0cac 100644
--- a/blivet/devicelibs/lvm.py
+++ b/blivet/devicelibs/lvm.py
@@ -149,6 +149,9 @@ def get_pv_space(size, disks, pesize=LVM_PE_SIZE,
     # XXX default extent size should be something we can ask of lvm
     # TODO: handle striped and mirrored
     # this is adding one extent for the lv's metadata
+    if size == 0:
+        return size
+
     space = clampSize(size, pesize, roundup=True) + \
             pesize
     return space
-- 
1.8.1.4



More information about the anaconda-patches mailing list