1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-24 06:04:19 +03:00

Thin ensure pool table is update after resize

Always make sure table gets reloaded.
For now activate and deactivate pool volume if it's not active.

FIXME: we could do this only if we are sure some thin volume is alive.
This commit is contained in:
Zdenek Kabelac 2011-11-08 12:19:53 +00:00
parent 1e6910032e
commit 2371f76c73

View File

@ -781,6 +781,20 @@ static int _lvresize(struct cmd_context *cmd, struct volume_group *vg,
backup(vg);
/*
* Update lvm pool metadata (drop messages) if the pool has been
* resumed and do a pool active/deactivate in other case.
*
* Note: Active thin pool can be waiting for resize.
*
* FIXME: Activate only when thin volume is active
*/
if (lv_is_thin_pool(lv) &&
!update_pool_lv(lv, !lv_is_active(lv))) {
stack;
return ECMD_FAILED;
}
log_print("Logical volume %s successfully resized", lp->lv_name);
if (lp->resizefs && (lp->resize == LV_EXTEND) &&