diff --git a/WHATS_NEW b/WHATS_NEW index 55ecb68b0..a712c5f20 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -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. diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index 4bce8085d..cd0a78cdf 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -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); } }