[PATCH 3/6] Set a non-zero size for new btrfs subvols in an existing volume.

David Lehman dlehman at redhat.com
Wed May 29 15:46:16 UTC 2013


A size of zero means you're adjusting a container after removing a device
from it, and short-circuits the code that actually creates/modifies the
subvol.
---
 blivet/devicefactory.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/blivet/devicefactory.py b/blivet/devicefactory.py
index 08adee0..5857969 100644
--- a/blivet/devicefactory.py
+++ b/blivet/devicefactory.py
@@ -1292,6 +1292,12 @@ class BTRFSFactory(DeviceFactory):
         else:
             self.size_set_class = SameSizeSet
 
+    def _handle_no_size(self):
+        """ Set device size so that it grows to the largest size possible. """
+        super(BTRFSFactory, self)._handle_no_size()
+        if self.container and self.container.exists:
+            self.size = self.container.size
+
     def _get_total_space(self):
         """ Return the total space needed for the specified container. """
         size = 0
-- 
1.8.1.4



More information about the anaconda-patches mailing list