[master 1/2] Add pvFree to lvmpv format
vojtechtrefny
installerbot-noreply at redhat.com
Mon Oct 19 10:39:17 UTC 2015
From: Vojtech Trefny <vtrefny at redhat.com>
Signed-off-by: Vojtech Trefny <vtrefny at redhat.com>
---
blivet/formats/lvmpv.py | 2 +-
blivet/populator.py | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/blivet/formats/lvmpv.py b/blivet/formats/lvmpv.py
index ee3e29e..3f7446f 100644
--- a/blivet/formats/lvmpv.py
+++ b/blivet/formats/lvmpv.py
@@ -79,6 +79,7 @@ def __init__(self, **kwargs):
self.vgName = kwargs.get("vgName")
self.vgUuid = kwargs.get("vgUuid")
self.peStart = kwargs.get("peStart", lvm.LVM_PE_START)
+ self.pvFree = kwargs.get("pvFree", Size(0))
self.dataAlignment = kwargs.get("dataAlignment", Size(0))
self.inconsistentVG = False
@@ -143,4 +144,3 @@ def status(self):
os.path.isdir("/dev/%s" % self.vgName))
register_device_format(LVMPhysicalVolume)
-
diff --git a/blivet/populator.py b/blivet/populator.py
index 733c593..a334928 100644
--- a/blivet/populator.py
+++ b/blivet/populator.py
@@ -1424,6 +1424,10 @@ def handleUdevDeviceFormat(self, info, device):
kwargs["peStart"] = Size(pv_info.pe_start)
else:
log.warning("PV %s has no pe_start", name)
+ if pv_info.pv_free:
+ kwargs["pvFree"] = Size(pv_info.pv_free)
+ else:
+ log.warning("PV %s has no pv_free", name)
elif format_type == "vfat":
# efi magic
if isinstance(device, PartitionDevice) and device.bootable:
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/e29354a7a459c805e7166691b74cc7b4364399c1
More information about the anaconda-patches
mailing list