[PATCH] Re-Check minimum size of partition after running fsck on it (#578955)

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

 



If a fs is not unmounted properly the minimum size check can be
incorrect. Rerun the check after doCheck is called and bump up the
size if it is smaller than the correct minimum.
---
 storage/formats/fs.py |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/storage/formats/fs.py b/storage/formats/fs.py
index 74ccc05..db51387 100644
--- a/storage/formats/fs.py
+++ b/storage/formats/fs.py
@@ -448,6 +448,16 @@ class FS(DeviceFormat):
 
         self.doCheck(intf=intf)
 
+        # The first minimum size can be incorrect if the fs was not
+        # properly unmounted. After doCheck the minimum size will be correct
+        # so run the check one last time and bump up the size if it was too
+        # small.
+        self._minInstanceSize = None
+        if self.targetSize < self.minSize:
+            self.targetSize = self.minSize
+            log.info("Minimum size changed, setting targetSize on %s to %s" \
+                     % (self.device, self.targetSize))
+
         w = None
         if intf:
             w = intf.progressWindow(_("Resizing"),
-- 
1.6.6.1

_______________________________________________
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