mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
raid: Use inherited tags when wiping rmeta.
If there's an activation volume_filter, it might not be possible to activate the rmeta LVs to wipe them. At least inherit any LV tags from the parent LV while attempting this.
This commit is contained in:
parent
e3efcdc9f5
commit
c76df666c9
@ -1,5 +1,6 @@
|
||||
Version 2.02.152 -
|
||||
==================================
|
||||
Use any inherited tags when wiping metadata sub LVs to ensure activation.
|
||||
Add str_list_wipe.
|
||||
Improve support for interrupting procesing of volumes during lvchange.
|
||||
Use failed command return code when lvchanging read-only volume.
|
||||
|
@ -3834,6 +3834,16 @@ static int _lv_extend_layered_lv(struct alloc_handle *ah,
|
||||
return 0;
|
||||
}
|
||||
lv_set_visible(meta_lv);
|
||||
|
||||
/*
|
||||
* Copy any tags from the new LV to the metadata LV so
|
||||
* it can be activated temporarily.
|
||||
*/
|
||||
if (!str_list_dup(meta_lv->vg->vgmem, &meta_lv->tags, &lv->tags)) {
|
||||
log_error("Failed to copy tags onto LV %s to clear metadata.", display_lvname(meta_lv));
|
||||
return 0;
|
||||
}
|
||||
|
||||
clear_metadata = 1;
|
||||
}
|
||||
|
||||
@ -3882,6 +3892,9 @@ static int _lv_extend_layered_lv(struct alloc_handle *ah,
|
||||
return 0;
|
||||
}
|
||||
lv_set_hidden(meta_lv);
|
||||
|
||||
/* Wipe any temporary tags required for activation. */
|
||||
str_list_wipe(&meta_lv->tags);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user