From 6dc3b9d5ce10e0f8c58266a6d30f5ff7252731bf Mon Sep 17 00:00:00 2001 From: David Lehman Date: Wed, 6 Feb 2013 12:05:53 -0600 Subject: [PATCH 04/13] Fix device resolution for btrfs. --- blivet/devicetree.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/blivet/devicetree.py b/blivet/devicetree.py index 834d6fe..b432adc 100644 --- a/blivet/devicetree.py +++ b/blivet/devicetree.py @@ -2214,7 +2214,10 @@ class DeviceTree(object): device = self.getDeviceByName(lv) # check mount options for btrfs volumes in case it's a subvol - if device and device.type == "btrfs volume" and options: + if device and device.type.startswith("btrfs") and options: + # start with the volume -- not a subvolume + device = getattr(device, "volume", device) + attr = None if "subvol=" in options: attr = "name" -- 1.8.1