void-packages/srcpkgs/lvm2/patches/lvm2-2_02_99-fix-possible-deadlock-in-lvmetad-for-parallel-update-and-query.patch

35 lines
1.2 KiB
Diff

commit 509ba58eaa537a8db2e0bd41d8c56c52a68e8512
Author: Peter Rajnoha <prajnoha@redhat.com>
Date: Tue May 14 11:04:30 2013 +0200
lvm2-2_02_99-fix-possible-deadlock-in-lvmetad-for-parallel-update-and-query.patch
---
WHATS_NEW | 1 +
daemons/lvmetad/lvmetad-core.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 25e07ee..4728466 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.99 -
===================================
+ Fix possible deadlock when querying and updating lvmetad at the same time.
Avoid a global lock in pvs when lvmetad is in use.
Fix crash in pvscan --cache -aay triggered by non-mda PV.
Fix lvm2app to return all property sizes in bytes.
diff --git a/daemons/lvmetad/lvmetad-core.c b/daemons/lvmetad/lvmetad-core.c
index 0a1c884..3f417da 100644
--- a/daemons/lvmetad/lvmetad-core.c
+++ b/daemons/lvmetad/lvmetad-core.c
@@ -675,8 +675,8 @@ static int update_metadata(lvmetad_state *s, const char *name, const char *_vgid
lock_vgid_to_metadata(s);
old = dm_hash_lookup(s->vgid_to_metadata, _vgid);
- lock_vg(s, _vgid);
unlock_vgid_to_metadata(s);
+ lock_vg(s, _vgid);
seq = dm_config_find_int(metadata, "metadata/seqno", -1);