[blivet:rhel7/master 2/2] Revert "Make space for LUKS metadata if creating encrypted device (#1038847)"
mulhern
amulhern at redhat.com
Tue Sep 16 17:26:05 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 bb8edef..76635f7 100644
--- a/blivet/devicefactory.py
+++ b/blivet/devicefactory.py
@@ -260,11 +260,6 @@ class DeviceFactory(object):
:type container_size: :class:`~.size.Size`
"""
-
- 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
@@ -835,12 +830,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