metadata: skip MDA_IGNORED flags PV write metadata
PATCH 1/1 metadata: skip MDA_IGNORED flags PV write metadata
From: Long YunJian <[email protected]>
If we set vgmetadatacopies value which less than PV available numbers in a VG, and use pvmetadataignore default 0, vgcreate save metadata to all pvs, included those set MDA_IGNORED flags PV. It is misleading into thinking that the set MDA_IGNORED PV is still in use. It also influence vgcreate performance in lots of PV environment. So, we add filter condition to avoid write metadata to those set MDA_IGNORED flags PV.
Signed-off-by Long YunJian <[email protected]>
Signed-off-by Yi Wang <[email protected]>
--- lib/metadata/metadata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/metadata/metadata.c +1 -1
@@ -3017,7 +3017,7 @@ int vg_write(struct volume_group *vg) dm_list_iterate_items(mda, &vg->fid->metadata_areas_in_use) { mda_dev =mda_get_device (mda); -if (mda->status &MDA_FAILED ) +if (mda->status &MDA_FAILED || mda->status &MDA_IGNORED )continue ;/*
Signature · 1 line
2.31.1