mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
reinstate: commit 82d83a01ce2cac77fec2e9b763061fbfb5f01ce8
It now works as supposed. The source of the problem is fixed by previous commit d2d6a9da52e04f28e1916bcea3f9fda356b6df29.
This commit is contained in:
parent
008c33a21b
commit
3b51f298bb
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.101 -
|
Version 2.02.101 -
|
||||||
===================================
|
===================================
|
||||||
|
Refresh existing VG before autoactivation (event retrigger/device reappeared).
|
||||||
Use pvscan -b in udev rules to avoid a deadlock on udev process count limit.
|
Use pvscan -b in udev rules to avoid a deadlock on udev process count limit.
|
||||||
Add pvscan -b/--background for the command to be processed in the background.
|
Add pvscan -b/--background for the command to be processed in the background.
|
||||||
Don't assume stdin file descriptor is readable.
|
Don't assume stdin file descriptor is readable.
|
||||||
|
@ -98,6 +98,7 @@ static int _auto_activation_handler(struct cmd_context *cmd,
|
|||||||
struct volume_group *vg;
|
struct volume_group *vg;
|
||||||
int consistent = 0;
|
int consistent = 0;
|
||||||
struct id vgid_raw;
|
struct id vgid_raw;
|
||||||
|
int r = 0;
|
||||||
|
|
||||||
/* TODO: add support for partial and clustered VGs */
|
/* TODO: add support for partial and clustered VGs */
|
||||||
if (partial)
|
if (partial)
|
||||||
@ -106,24 +107,29 @@ static int _auto_activation_handler(struct cmd_context *cmd,
|
|||||||
if (!id_read_format(&vgid_raw, vgid))
|
if (!id_read_format(&vgid_raw, vgid))
|
||||||
return_0;
|
return_0;
|
||||||
|
|
||||||
/* NB. This is safe because we know lvmetad is running and we won't hit
|
/* NB. This is safe because we know lvmetad is running and we won't hit disk. */
|
||||||
* disk. */
|
|
||||||
if (!(vg = vg_read_internal(cmd, NULL, (const char *) &vgid_raw, 0, &consistent)))
|
if (!(vg = vg_read_internal(cmd, NULL, (const char *) &vgid_raw, 0, &consistent)))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if (vg_is_clustered(vg)) {
|
if (vg_is_clustered(vg)) {
|
||||||
release_vg(vg);
|
r = 1; goto out;
|
||||||
return 1;
|
}
|
||||||
|
|
||||||
|
if (!vg_refresh_visible(vg->cmd, vg)) {
|
||||||
|
log_error("%s: refresh before autoactivation failed.", vg->name);
|
||||||
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!vgchange_activate(vg->cmd, vg, activate)) {
|
if (!vgchange_activate(vg->cmd, vg, activate)) {
|
||||||
log_error("%s: autoactivation failed.", vg->name);
|
log_error("%s: autoactivation failed.", vg->name);
|
||||||
release_vg(vg);
|
goto out;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
r = 1;
|
||||||
|
|
||||||
|
out:
|
||||||
release_vg(vg);
|
release_vg(vg);
|
||||||
return 1;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _pvscan_lvmetad(struct cmd_context *cmd, int argc, char **argv)
|
static int _pvscan_lvmetad(struct cmd_context *cmd, int argc, char **argv)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user