From c7dfead54bae5a1c8119047e4a3a4815960dc5c3 Mon Sep 17 00:00:00 2001 From: David Lehman Date: Thu, 19 Jul 2012 17:19:07 -0500 Subject: [PATCH 6/6] Add a convenience method for new btrfs subvols and drop subvol size args. --- pyanaconda/storage/__init__.py | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py index a4ca648..7e772cf 100644 --- a/pyanaconda/storage/__init__.py +++ b/pyanaconda/storage/__init__.py @@ -1212,6 +1212,7 @@ class Storage(object): fmt_kwargs["mountopts"] = "subvol=%s" % name kwargs.pop("metaDataLevel", None) kwargs.pop("dataLevel", None) + kwargs.pop("size", None) else: dev_class = BTRFSVolumeDevice # set up the volume label, using hostname if necessary @@ -1241,6 +1242,10 @@ class Storage(object): device.format = getFormat("btrfs", **fmt_kwargs) return device + def newBTRFSSubVolume(self, *args, **kwargs): + kwargs["subvol"] = True + return self.newBTRFS(*args, **kwargs) + def createDevice(self, device): """ Schedule creation of a device. -- 1.7.7.6