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

thin: do not check of empty pool with messages

The empty pool is also the pool which has yet queued list of messages
and transaction_id == 1.

Problem is exposed when pool is created inactive.

lvcreate -L10 -T vg/pool -an
lvcreate -V10 -T vg/pool
This commit is contained in:
Zdenek Kabelac 2014-03-11 22:54:33 +01:00
parent 1850a6e454
commit 4d64e91efd
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.106 -
====================================
Do not try to check empty pool with scheduled messages.
Fix return value in pool_has_message() when quering for any message.
Cleanup all client resources on clvmd exit.
Use dm_zalloc to clear members of clvmd client struct.

View File

@ -1790,7 +1790,9 @@ static int _thin_pool_register_callback(struct dev_manager *dm,
struct thin_cb_data *data;
/* Skip metadata testing for unused pool. */
if (!first_seg(lv)->transaction_id)
if (!first_seg(lv)->transaction_id ||
((first_seg(lv)->transaction_id == 1) &&
pool_has_message(first_seg(lv), NULL, 0)))
return 1;
if (!(data = dm_pool_alloc(dm->mem, sizeof(*data)))) {