[blivet:master 1/2] Eliminate TmpFS.minSize()

mulhern amulhern at redhat.com
Wed Nov 12 12:52:05 UTC 2014


TmpFS inherits both _minSize and _minInstanceSize from FS, where they are
both 0. TmpFS has no method to update _minInstanceSize, so _minInstanceSize
will always remain 0. Therefore, it would make sense for minSize() method
to just return the value of _minSize, indicating the the minimum size
for this filesystem is based just on its type, not on any information about
the particular instance. However, this is exactly what
DeviceFormat.minSize() which TmpFS would inherit if it didn't override,
does, so might as well just get rid of the overriding method, and let it
inherit.

This is a bit problematic, since 0 is used to mean unknown, but here means
0. It is possible that a method to obtain the minimum size of an existing
TmpFS instance should be written, but in the meantime, this change
makes the situation more obvious than it was previously.

Signed-off-by: mulhern <amulhern at redhat.com>
---
 blivet/formats/fs.py | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
index 3fa6908..2199381 100644
--- a/blivet/formats/fs.py
+++ b/blivet/formats/fs.py
@@ -1579,10 +1579,6 @@ class TmpFS(NoDevFS):
         return self._size
 
     @property
-    def minSize(self):
-        return self._minInstanceSize
-
-    @property
     def free(self):
         if self._mountpoint:
             # If self._mountpoint is defined, it means this tmpfs mount
-- 
1.9.3



More information about the anaconda-patches mailing list