[master 1/6] Add information about subvolume to BTRFS format
vojtechtrefny
installerbot-noreply at redhat.com
Thu Mar 19 13:20:31 UTC 2015
From: Vojtech Trefny <vtrefny at redhat.com>
Signed-off-by: Vojtech Trefny <vtrefny at redhat.com>
---
blivet/devices/btrfs.py | 1 +
blivet/devicetree.py | 1 +
blivet/formats/fs.py | 1 +
3 files changed, 3 insertions(+)
diff --git a/blivet/devices/btrfs.py b/blivet/devices/btrfs.py
index b650854..4f4ade1 100644
--- a/blivet/devices/btrfs.py
+++ b/blivet/devices/btrfs.py
@@ -195,6 +195,7 @@ def __init__(self, *args, **kwargs):
label=label,
volUUID=self.uuid,
device=self.path,
+ subvolspec=self.vol_id,
mountopts="subvolid=%d" % self.vol_id)
self.originalFormat = copy.copy(self.format)
diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index 322087f..75f00d0 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -1740,6 +1740,7 @@ def handleBTRFSFormat(self, info, device):
fmt = getFormat("btrfs", device=btrfs_dev.path, exists=True,
volUUID=btrfs_dev.format.volUUID,
+ subvolspec=vol_path,
mountopts="subvol=%s" % vol_path)
if vol_id in snapshot_ids:
device_class = BTRFSSnapShotDevice
diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
index 69ead04..9c7353a 100644
--- a/blivet/formats/fs.py
+++ b/blivet/formats/fs.py
@@ -1123,6 +1123,7 @@ class BTRFS(FS):
def __init__(self, **kwargs):
super(BTRFS, self).__init__(**kwargs)
self.volUUID = kwargs.pop("volUUID", None)
+ self.subvolspec = kwargs.pop("subvolspec", None)
def create(self, **kwargs):
# filesystem creation is done in storage.devicelibs.btrfs.create_volume
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/796351c5fa4a254fd42339da30a723764bce5c6c
More information about the anaconda-patches
mailing list