[PATCH 2/2] Allow handling device format for already handled BTRFS
Vojtech Trefny
vtrefny at redhat.com
Mon Dec 8 14:24:50 UTC 2014
Signed-off-by: Vojtech Trefny <vtrefny at redhat.com>
---
blivet/devicetree.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index 719fcf8..ecf8dba 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -1669,8 +1669,9 @@ class DeviceTree(object):
break
if btrfs_dev:
- log.info("found btrfs volume %s", btrfs_dev.name)
- btrfs_dev.parents.append(device)
+ if device not in btrfs_dev.parents:
+ log.info("found btrfs volume %s", btrfs_dev.name)
+ btrfs_dev.parents.append(device)
else:
label = udev.device_get_label(info)
log.info("creating btrfs volume btrfs.%s", label)
@@ -1752,7 +1753,8 @@ class DeviceTree(object):
# we fall through to handle that.
return
- if (not device) or (not format_type) or device.format.type:
+ if (not device) or (not format_type) or \
+ device.format.type not in [None, "btrfs"]:
# this device has no formatting or it has already been set up
# FIXME: this probably needs something special for disklabels
log.debug("no type or existing type for %s, bailing", name)
--
2.1.0
More information about the anaconda-patches
mailing list