[PATCH 2/8] Improve adjustment for removal of a subvol in BTRFSFactory.
David Lehman
dlehman at redhat.com
Tue Sep 16 16:41:05 UTC 2014
Resolves: rhbz#1078995
---
blivet/devicefactory.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/blivet/devicefactory.py b/blivet/devicefactory.py
index 7926d39..fbc2231 100644
--- a/blivet/devicefactory.py
+++ b/blivet/devicefactory.py
@@ -1626,8 +1626,11 @@ class BTRFSFactory(DeviceFactory):
if self.container_size == SIZE_POLICY_AUTO:
# automatic
if self.container and not self.device:
- # For new subvols the size is in addition to the volume's size.
- size += self.container.size
+ if self.size != 0:
+ # For new subvols the size is in addition to the volume's size.
+ size += self.container.size
+ else:
+ size += sum(s.req_size for s in self.container.subvolumes)
size += self._get_device_space()
elif self.container_size == SIZE_POLICY_MAX:
--
1.9.3
More information about the anaconda-patches
mailing list