Skip to content

Commit

Permalink
Add information about subvolume to BTRFS format
Browse files Browse the repository at this point in the history
Signed-off-by: Vojtech Trefny <vtrefny@redhat.com>
  • Loading branch information
vojtechtrefny committed Mar 18, 2015
1 parent 8c8406c commit 796351c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions blivet/devices/btrfs.py
Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions blivet/devicetree.py
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions blivet/formats/fs.py
Expand Up @@ -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
Expand Down

0 comments on commit 796351c

Please sign in to comment.