mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
monitoring: preserve monitoring status during update
Ignore monitoring during whole update (suspend/resume) of thin-pool.
This commit is contained in:
parent
eb51be4fbe
commit
dc8c5c1886
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.158 -
|
Version 2.02.158 -
|
||||||
=================================
|
=================================
|
||||||
|
Preserve monitoring status when updating thin-pool metadata.
|
||||||
Rerurn 0 (inactive) when status cannot be queried in _lv_active().
|
Rerurn 0 (inactive) when status cannot be queried in _lv_active().
|
||||||
Switch to log_warn() for failing activation status query.
|
Switch to log_warn() for failing activation status query.
|
||||||
Refactor lvconvert argument handling code.
|
Refactor lvconvert argument handling code.
|
||||||
|
@ -451,9 +451,15 @@ int update_pool_lv(struct logical_volume *lv, int activate)
|
|||||||
|
|
||||||
if (activate) {
|
if (activate) {
|
||||||
/* If the pool is not active, do activate deactivate */
|
/* If the pool is not active, do activate deactivate */
|
||||||
|
monitored = dmeventd_monitor_mode();
|
||||||
|
init_dmeventd_monitor(DMEVENTD_MONITOR_IGNORE);
|
||||||
if (!lv_is_active(lv)) {
|
if (!lv_is_active(lv)) {
|
||||||
monitored = dmeventd_monitor_mode();
|
/*
|
||||||
init_dmeventd_monitor(DMEVENTD_MONITOR_IGNORE);
|
* FIXME:
|
||||||
|
* Rewrite activation code to handle whole tree of thinLVs
|
||||||
|
* as this version has major problem when it does not know
|
||||||
|
* which Node has pool active.
|
||||||
|
*/
|
||||||
if (!activate_lv_excl(lv->vg->cmd, lv)) {
|
if (!activate_lv_excl(lv->vg->cmd, lv)) {
|
||||||
init_dmeventd_monitor(monitored);
|
init_dmeventd_monitor(monitored);
|
||||||
return_0;
|
return_0;
|
||||||
@ -481,13 +487,12 @@ int update_pool_lv(struct logical_volume *lv, int activate)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (activate) {
|
if (activate &&
|
||||||
if (!deactivate_lv(lv->vg->cmd, lv)) {
|
!deactivate_lv(lv->vg->cmd, lv)) {
|
||||||
log_error("Failed to deactivate %s.", display_lvname(lv));
|
log_error("Failed to deactivate %s.", display_lvname(lv));
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
|
||||||
init_dmeventd_monitor(monitored);
|
|
||||||
}
|
}
|
||||||
|
init_dmeventd_monitor(monitored);
|
||||||
|
|
||||||
/* Unlock memory if possible */
|
/* Unlock memory if possible */
|
||||||
memlock_unlock(lv->vg->cmd);
|
memlock_unlock(lv->vg->cmd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user