[blivet:rhel7/master 2/3] Revert "Make space for LUKS metadata if creating encrypted device (#1038847)"

mulhern amulhern at redhat.com
Thu Sep 25 18:03:01 UTC 2014


Related: rhbz#1076055

This reverts commit 391dc86b1290172bcc1bd3d02aec07e6869f3a60 except for the
definition of _minSize, which seems like the correct definition and may
come in handy later.

The idea is to handle LUKS space requirements in device instead of device
factory methods.

Signed-off-by: mulhern <amulhern at redhat.com>
---
 blivet/devicefactory.py | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/blivet/devicefactory.py b/blivet/devicefactory.py
index 8782a8a..61e8aa1 100644
--- a/blivet/devicefactory.py
+++ b/blivet/devicefactory.py
@@ -263,11 +263,6 @@ class DeviceFactory(object):
             :type min_luks_entropy: int
 
         """
-
-        if encrypted and size:
-            # encrypted, bump size up with LUKS metadata size
-            size += getFormat("luks").minSize
-
         self.storage = storage          # a Blivet instance
         self.size = size                # the requested size for this device
         self.disks = disks              # the set of disks to allocate from
@@ -841,12 +836,7 @@ class PartitionFactory(DeviceFactory):
         else:
             min_format_size = getFormat(self.fstype).minSize
 
-        # min_format_size may be None here, make sure it is a number
-        min_format_size = min_format_size or 0
-        if self.encrypted:
-            min_format_size += getFormat("luks").minSize
-
-        return max(Size("1MiB"), min_format_size)
+        return max(Size("1MiB"), min_format_size or 0)
 
     def _get_device_size(self):
         """ Return the factory device size including container limitations. """
-- 
1.9.3



More information about the anaconda-patches mailing list