From: mulhern amulhern@redhat.com
Signed-off-by: mulhern amulhern@redhat.com --- blivet/formats/fs.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py index 03cce99..7fc93ae 100644 --- a/blivet/formats/fs.py +++ b/blivet/formats/fs.py @@ -110,6 +110,8 @@ def getTaskObject(klass): self._sync = getTaskObject(self._syncClass) self._writelabel = getTaskObject(self._writelabelClass)
+ self._current_info = None # info obtained by _info task + self.mountpoint = kwargs.get("mountpoint") self.mountopts = kwargs.get("mountopts") self.label = kwargs.get("label") @@ -243,8 +245,8 @@ def updateSizeInfo(self): errors = False finally: # try to gather current size info anyway - info = self._getFSInfo() - self._size = self._getExistingSize(info=info) + self._current_info = self._getFSInfo() + self._size = self._getExistingSize(info=self._current_info) self._minSize = self._size # default to current size # We absolutely need a current size to enable resize. To shrink the # filesystem we need a real minimum size provided by the resize @@ -253,7 +255,7 @@ def updateSizeInfo(self): if errors or self._size == Size(0): self._resizable = False
- self._getMinSize(info=info) # force calculation of minimum size + self._getMinSize(info=self._current_info) # force calculation of minimum size
def _getMinSize(self, info=None): pass