mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvmlockd: use pool lock for tmeta access
When a command is run on a named tmeta LV, use the lock on the pool.
This commit is contained in:
parent
b9e4198500
commit
b910c34f09
@ -2161,6 +2161,10 @@ static int _lockd_lv_thin(struct cmd_context *cmd, struct logical_volume *lv,
|
||||
/* FIXME: there should be a function to get pool lv from data lv. */
|
||||
pool_lv = lv_parent(lv);
|
||||
|
||||
} else if (lv_is_thin_pool_metadata(lv)) {
|
||||
struct lv_segment *pool_seg = get_only_segment_using_this_lv(lv);
|
||||
pool_lv = pool_seg->lv;
|
||||
|
||||
} else {
|
||||
/* This should not happen AFAIK. */
|
||||
log_error("Lock on incorrect thin lv type %s/%s",
|
||||
|
Loading…
Reference in New Issue
Block a user