1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

pvmove: support properly subLV locking

Since we support snapshot of mirrors, we do need to properly check
for stacked lock holder - fixes problem of pvmove in cluster
with mirrors under snapshot.

WHATS_NEW for this patch goes with 'Restore pvmove support...'
This commit is contained in:
Zdenek Kabelac 2018-03-27 21:08:40 +02:00
parent 7a7b8a7778
commit ace97c9f9c

View File

@ -393,10 +393,15 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd,
}
seg = first_seg(lv);
/* Presence of exclusive LV decides whether pvmove must be also exclusive */
if ((seg_only_exclusive(seg) || lv_is_origin(lv) || lv_is_cow(lv)))
needs_exclusive = 1;
if (!needs_exclusive) {
/* Presence of exclusive LV decides whether pvmove must be also exclusive */
if (!seg_only_exclusive(seg)) {
holder = lv_lock_holder(lv);
if (seg_only_exclusive(first_seg(holder)) || lv_is_origin(holder) || lv_is_cow(holder))
needs_exclusive = 1;
} else
needs_exclusive = 1;
}
if (seg_is_raid(seg) || seg_is_mirrored(seg)) {
dm_list_init(&trim_list);