Always return an empty list when is_held is called on a multipath
device.
The dmcrypt logic base decisions depending on the holders/slaves
relationship. Such relationships can also exists for multipath devices
but do not have the same semantic.
http://tracker.ceph.com/issues/11881 Fixes: #11881
Signed-off-by: Loic Dachary <ldachary@redhat.com>
Check if a device is held by another device (e.g., a dm-crypt mapping)
"""
assert os.path.exists(dev)
+ if is_mpath(dev):
+ return []
+
dev = os.path.realpath(dev)
base = get_dev_name(dev)