1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-24 14:50:34 +03:00

Thin skip activation when there are no thin message

If the list with thin messages is empty, do not touch thin pool device.
This commit is contained in:
Zdenek Kabelac 2012-01-25 09:17:15 +00:00
parent 5feef4f92b
commit cfd3d9413b

View File

@ -371,6 +371,9 @@ int update_pool_lv(struct logical_volume *lv, int activate)
return 0;
}
if (dm_list_empty(&(first_seg(lv)->thin_messages)))
return 1; /* No messages */
if (activate) {
/* If the pool is not active, do activate deactivate */
if (!lv_is_active(lv)) {
@ -389,14 +392,12 @@ int update_pool_lv(struct logical_volume *lv, int activate)
}
}
if (!dm_list_empty(&first_seg(lv)->thin_messages)) {
dm_list_init(&first_seg(lv)->thin_messages);
dm_list_init(&(first_seg(lv)->thin_messages));
if (!vg_write(lv->vg) || !vg_commit(lv->vg))
return_0;
if (!vg_write(lv->vg) || !vg_commit(lv->vg))
return_0;
backup(lv->vg);
}
backup(lv->vg);
return 1;
}