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:
parent
8eb3a5b557
commit
75b28ab49d
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user