diff --git a/WHATS_NEW b/WHATS_NEW index c56be6d0e..f1a99336a 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -14,7 +14,6 @@ Version 2.02.101 - Prevent cluster mirror logs from being corrupted by redundant checkpoints. Fix ignored lvmetad update on loop device configuration (2.02.99). Use LVM_PATH instead of hardcoded value in lvm2 activation systemd generator. - Refresh existing VG before autoactivation (event retrigger/device reappeared). Fix vgck to notice on-disk corruption even if lvmetad is used. Move mpath device filter before partitioned filter (which opens devices). Split partitioned filter out of lvm_type filter. diff --git a/tools/pvscan.c b/tools/pvscan.c index 3f16b05a5..96bbf6b86 100644 --- a/tools/pvscan.c +++ b/tools/pvscan.c @@ -98,7 +98,6 @@ static int _auto_activation_handler(struct cmd_context *cmd, struct volume_group *vg; int consistent = 0; struct id vgid_raw; - int r = 0; /* TODO: add support for partial and clustered VGs */ if (partial) @@ -107,29 +106,24 @@ static int _auto_activation_handler(struct cmd_context *cmd, if (!id_read_format(&vgid_raw, vgid)) return_0; - /* NB. This is safe because we know lvmetad is running and we won't hit disk. */ + /* NB. This is safe because we know lvmetad is running and we won't hit + * disk. */ if (!(vg = vg_read_internal(cmd, NULL, (const char *) &vgid_raw, 0, &consistent))) return 1; if (vg_is_clustered(vg)) { - r = 1; goto out; - } - - if (!vg_refresh_visible(vg->cmd, vg)) { - log_error("%s: refresh before autoactivation failed.", vg->name); - goto out; + release_vg(vg); + return 1; } if (!vgchange_activate(vg->cmd, vg, activate)) { log_error("%s: autoactivation failed.", vg->name); - goto out; + release_vg(vg); + return 0; } - r = 1; - -out: release_vg(vg); - return r; + return 1; } static int _pvscan_lvmetad(struct cmd_context *cmd, int argc, char **argv)