From 77305127e42ab79a52cd9f5e32956db2c51edb99 Mon Sep 17 00:00:00 2001 From: David Teigland Date: Fri, 11 Oct 2024 17:02:31 -0500 Subject: [PATCH] vg: use vg_copy_struct in second location --- lib/metadata/metadata.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c index 2d22100ae..99c5d16ea 100644 --- a/lib/metadata/metadata.c +++ b/lib/metadata/metadata.c @@ -5175,9 +5175,11 @@ struct volume_group *vg_read(struct cmd_context *cmd, const char *vg_name, const goto out; } - if (!(vg->vg_committed = import_vg_from_config_tree(cmd, vg->fid, vg->committed_cft))) { - log_error("Failed to import written VG."); - goto out; + if (!(vg->vg_committed = vg_copy_struct(vg))) { + if (!(vg->vg_committed = import_vg_from_config_tree(cmd, vg->fid, vg->committed_cft))) { + log_error("Failed to import written VG."); + goto out; + } } } else { if (vg->vg_precommitted)