From 553f37da71fecd167fd97b26a33c341b8cba485a Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Wed, 28 Jan 2015 13:34:41 +0100 Subject: [PATCH] raid: lock holder will skip visible raid LVs RAID marks legs as VISIBLE with notion it's not longer true raid leg - so skip tree scannig and take this LV as top-level LV. --- lib/metadata/lv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/metadata/lv.c b/lib/metadata/lv.c index 683ec47a7..9052e6337 100644 --- a/lib/metadata/lv.c +++ b/lib/metadata/lv.c @@ -1018,6 +1018,10 @@ const struct logical_volume *lv_lock_holder(const struct logical_volume *lv) return sl->seg->lv; } + /* RAID changes visibility of splitted LVs but references them still as leg/meta */ + if ((lv_is_raid_image(lv) || lv_is_raid_metadata(lv)) && lv_is_visible(lv)) + return lv; + /* For other types, by default look for the first user */ dm_list_iterate_items(sl, &lv->segs_using_this_lv) { /* FIXME: complete this exception list */ -- 2.43.5