1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

pvscan: restore polling in autoactivation handler

This commit fixes regression in auto-activation code introduced
in commit: c26d81d6e6.

- resolves rhbz1295562
This commit is contained in:
Ondrej Kozina 2016-01-07 15:17:08 +01:00
parent d6cf83968c
commit 40701af969
4 changed files with 14 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.140 - Version 2.02.140 -
=================================== ===================================
Restore background polling processing during auto-activation (2.02.119).
Use brackets to signify LVs which are not visible when reporting lv_parent. Use brackets to signify LVs which are not visible when reporting lv_parent.
Fix invalid memory read when reporting cache LV policy_name (2.02.126). Fix invalid memory read when reporting cache LV policy_name (2.02.126).

View File

@ -190,6 +190,15 @@ static int _auto_activation_handler(struct cmd_context *cmd,
goto out; goto out;
} }
/*
* After sucessfull activation we need to initialise polling
* for all activated LVs in a VG. Possible enhancement would
* be adding --poll y|n cmdline option for pvscan and call
* init_background_polling routine in autoactivation handler.
*/
if (!(vgchange_background_polling(vg->cmd, vg)))
goto_out;
r = 1; r = 1;
out: out:

View File

@ -185,4 +185,6 @@ int mirror_remove_missing(struct cmd_context *cmd,
int vgchange_activate(struct cmd_context *cmd, struct volume_group *vg, int vgchange_activate(struct cmd_context *cmd, struct volume_group *vg,
activation_change_t activate); activation_change_t activate);
int vgchange_background_polling(struct cmd_context *cmd, struct volume_group *vg);
#endif #endif

View File

@ -174,7 +174,7 @@ static int _vgchange_monitoring(struct cmd_context *cmd, struct volume_group *vg
return r; return r;
} }
static int _vgchange_background_polling(struct cmd_context *cmd, struct volume_group *vg) int vgchange_background_polling(struct cmd_context *cmd, struct volume_group *vg)
{ {
int polled; int polled;
@ -999,7 +999,7 @@ static int vgchange_single(struct cmd_context *cmd, const char *vg_name,
if (!arg_count(cmd, refresh_ARG) && if (!arg_count(cmd, refresh_ARG) &&
background_polling()) background_polling())
if (!_vgchange_background_polling(cmd, vg)) if (!vgchange_background_polling(cmd, vg))
return_ECMD_FAILED; return_ECMD_FAILED;
if (arg_is_set(cmd, lockstart_ARG)) { if (arg_is_set(cmd, lockstart_ARG)) {