diff --git a/WHATS_NEW b/WHATS_NEW index 9ff8b5174..f6ead678f 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.177 - ==================================== + When writing metadata, consistently skip mdas marked as failed. Refactor and adjust text format metadata alignment calculation. Fix python3 path in lvmdbusd to use value detected by configure. Reduce checks for active LVs in vgchange before background polling. diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c index 56b5b13f3..6c55d89b1 100644 --- a/lib/metadata/metadata.c +++ b/lib/metadata/metadata.c @@ -3039,6 +3039,8 @@ int vg_write(struct volume_group *vg) /* Write to each copy of the metadata area */ dm_list_iterate_items(mda, &vg->fid->metadata_areas_in_use) { + if (mda->status & MDA_FAILED) + continue; if (!mda->ops->vg_write) { log_error("Format does not support writing volume" "group metadata areas"); @@ -3063,6 +3065,9 @@ int vg_write(struct volume_group *vg) dm_list_uniterate(mdah, &vg->fid->metadata_areas_in_use, &mda->list) { mda = dm_list_item(mdah, struct metadata_area); + if (mda->status & MDA_FAILED) + continue; + if (mda->ops->vg_revert && !mda->ops->vg_revert(vg->fid, vg, mda)) { stack;