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

lvmlockd: use lock on thin pool when command names tdata

Some lvconvert commands can be used directly on the data sublv:
lvconvert ... vg/pool_tdata

The correct LV lock to use in lvmlockd is the one on the pool LV.
This commit is contained in:
David Teigland 2017-07-07 12:06:53 -05:00
parent fdd00ecdd1
commit a0f6135e5c

View File

@ -2077,6 +2077,10 @@ static int _lockd_lv_thin(struct cmd_context *cmd, struct logical_volume *lv,
} else if (lv_is_thin_pool(lv)) {
pool_lv = lv;
} else if (lv_is_thin_pool_data(lv)) {
/* FIXME: there should be a function to get pool lv from data lv. */
pool_lv = lv_parent(lv);
} else {
/* This should not happen AFAIK. */
log_error("Lock on incorrect thin lv type %s/%s",