mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
revert: commit 82d83a01ce
The commit 82d83a01ce
"autoactivation: refresh existing VG before autoactivation"
causes problems (dangling udev_sync cookies, slow processing
of the pvscan --cache --major --minor call from udev rules)
when the autoactivation handler is run in parallel on
several PVs that belong to the same VG. Revert this patch
until the exact source of the problem is found and then
properly fixed and handled.
This commit is contained in:
parent
039585bb0d
commit
44c1a02c18
@ -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.
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user