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

lv_lock_holder: unused cache-pool is not lock holder

Unused cache-pool is only a constainer for data and metadata,
and does not present localble entity.
This commit is contained in:
Zdenek Kabelac 2017-11-11 00:18:22 +01:00
parent 52cee9dd83
commit dd06a0a4a6

View File

@ -1613,6 +1613,9 @@ const struct logical_volume *lv_lock_holder(const struct logical_volume *lv)
continue; /* Skip thin snaphost */
if (lv_is_pending_delete(sl->seg->lv))
continue; /* Skip deleted LVs */
if (lv_is_cache_pool(sl->seg->lv) &&
!lv_is_used_cache_pool(sl->seg->lv))
continue; /* Skip unused cache-pool */
return lv_lock_holder(sl->seg->lv);
}