1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

Thin keep pool device in the same state

Leave the optimalisation to be done differently and preserve
availability state of the pool device.
This commit is contained in:
Zdenek Kabelac 2011-11-03 15:58:20 +00:00
parent 9aa24bd034
commit 1cae10a36c

View File

@ -307,10 +307,11 @@ int update_pool_lv(struct logical_volume *lv, int activate)
if (activate) { if (activate) {
/* If the pool was not yet activated, do it */ /* If the pool was not yet activated, do it */
if (!lv_is_active(lv) && if (!lv_is_active(lv)) {
!activate_lv_excl(lv->vg->cmd, lv)) { if (!activate_lv_excl(lv->vg->cmd, lv))
log_error("Failed to activate %s.", lv->name); return_0;
return 0; if (!deactivate_lv(lv->vg->cmd, lv))
return_0;
} }
/* If already active, do suspend resume /* If already active, do suspend resume
* *