[master 1/1] Do not update current size information on LVM snapshots

vojtechtrefny installerbot-noreply at redhat.com
Tue May 5 13:31:57 UTC 2015


From: Vojtech Trefny <vtrefny at redhat.com>

StorageDevice.readCurrentSize method implementation checks the size
of devices in /sys where the size of LVM snapshots is incorrect (it
reports the size of the LV instead of the actual size of the snapshot).

Signed-off-by: Vojtech Trefny <vtrefny at redhat.com>
---
 blivet/devices/lvm.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/blivet/devices/lvm.py b/blivet/devices/lvm.py
index d7526e4..cbd4da1 100644
--- a/blivet/devices/lvm.py
+++ b/blivet/devices/lvm.py
@@ -966,6 +966,11 @@ def dependsOn(self, dep):
         return (self.origin == dep or
                 super(LVMSnapShotBase, self).dependsOn(dep))
 
+    def readCurrentSize(self):
+        # override StorageDevice.readCurrentSize because /sys reports wrong size
+        # for snapshots
+        return self._size
+
 class LVMThinPoolDevice(LVMLogicalVolumeDevice):
     """ An LVM Thin Pool """
     _type = "lvmthinpool"


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/432a21213d7a5fdf978177b5871c281f3c507c79


More information about the anaconda-patches mailing list