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

lvmlockd: query the simplest check first

Check for visibility of the LV first.

TODO:

Short check list and test only for those that can't be locked,
but they are visible LVs.
This commit is contained in:
Zdenek Kabelac 2023-07-14 13:26:42 +02:00
parent 8eb3a5b557
commit 75b28ab49d

View File

@ -3315,6 +3315,9 @@ out:
int lockd_lv_uses_lock(struct logical_volume *lv)
{
if (!lv_is_visible(lv))
return 0;
if (lv_is_thin_volume(lv))
return 0;
@ -3368,9 +3371,6 @@ int lockd_lv_uses_lock(struct logical_volume *lv)
if (lv_is_raid_metadata(lv))
return 0;
if (!lv_is_visible(lv))
return 0;
return 1;
}