[master 4/4] Set a subvolspec format args when making a new BTRFS volume.

mulkieran installerbot-noreply at redhat.com
Tue May 12 12:32:46 UTC 2015


From: mulhern <amulhern at redhat.com>

Set it from the MAIN_VOLUME_ID for a volume or from the name for a
subvolume.

Signed-off-by: mulhern <amulhern at redhat.com>
---
 blivet/blivet.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/blivet/blivet.py b/blivet/blivet.py
index 0db833c..f85c462 100644
--- a/blivet/blivet.py
+++ b/blivet/blivet.py
@@ -39,6 +39,7 @@
 from .deviceaction import ActionDestroyFormat, ActionResizeDevice, ActionResizeFormat
 from .devicelibs.edd import get_edd_dict
 from .devicelibs.dasd import make_dasd_list, write_dasd_conf
+from .devicelibs.btrfs import MAIN_VOLUME_ID
 from .errors import StorageError
 from .size import Size
 from .devicetree import DeviceTree
@@ -1010,6 +1011,7 @@ def newBTRFS(self, *args, **kwargs):
                 # already in use within the parent volume
                 name = self.suggestDeviceName(mountpoint=mountpoint)
             fmt_args["mountopts"] = "subvol=%s" % name
+            fmt_args["subvolspec"] = name
             kwargs.pop("metaDataLevel", None)
             kwargs.pop("dataLevel", None)
         else:
@@ -1023,6 +1025,7 @@ def newBTRFS(self, *args, **kwargs):
                 name = self.suggestContainerName(hostname=hostname)
             if "label" not in fmt_args:
                 fmt_args["label"] = name
+            fmt_args["subvolspec"] = MAIN_VOLUME_ID
 
         # discard fmt_type since it's btrfs always
         kwargs.pop("fmt_type", None)


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/71f1bb2d5d783eb96ef9e41d98323e13b3497edd


More information about the anaconda-patches mailing list