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

lvmcache: skip drop when vg_write lock is not held

Commit 80f4b4b803
introduced undesirable side-effects for lvm2app user
which happens to be our own python binding.

It appear obtaing pvs list keeps global lock.

So restricting this to VG_GLOBAL READ locks and skip
the drop skip if WRITE lock is held.
This commit is contained in:
Zdenek Kabelac 2015-04-02 12:42:18 +02:00
parent f199aeb9ea
commit e28e22b9e1
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.119 - Version 2.02.119 -
================================== ==================================
Don't skip invalidation of cached orphans if vg write lck is held (2.02.118).
Log relevant PV tags when using cling allocation. Log relevant PV tags when using cling allocation.
Add str_list_add_list() to combine two lists. Add str_list_add_list() to combine two lists.
Fix LV processing with selection to always do the selection on initial state. Fix LV processing with selection to always do the selection on initial state.

View File

@ -287,7 +287,7 @@ void lvmcache_commit_metadata(const char *vgname)
void lvmcache_drop_metadata(const char *vgname, int drop_precommitted) void lvmcache_drop_metadata(const char *vgname, int drop_precommitted)
{ {
if (lvmcache_vgname_is_locked(VG_GLOBAL)) if (lvmcache_vgname_is_locked(VG_GLOBAL) && !vg_write_lock_held())
return; return;
/* For VG_ORPHANS, we need to invalidate all labels on orphan PVs. */ /* For VG_ORPHANS, we need to invalidate all labels on orphan PVs. */