Skip to contentSkip to conversation

master - dmeventd: new initialization of plugin threads

PATCH Zdenek Kabelac 1 participant 1 message Oct 13, 2015

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=76ea01dd207ce185891418c3f8ffdcff14bf2672
Commit:        76ea01dd207ce185891418c3f8ffdcff14bf2672
Parent:        362558cd66bc08f8a46ababef66f2df21e8bd6fc
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Tue Oct 13 09:43:09 2015 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Tue Oct 13 15:55:05 2015 +0200

dmeventd: new initialization of plugin threads

Rework thread creation code to better use resources.

New code will not leak 'timeout' registered thread on error path.

Also if the thread already exist - avoid creation of thread object and it's later destruction.

If the race is noticed during adding new monitoring thread, such thread is put on cleanup list and -EEXIST is reported.

---
 WHATS_NEW_DM                |    1 +
 daemons/dmeventd/dmeventd.c |  170 +++++++++++++++++++++---------------------
 2 files changed, 86 insertions(+), 85 deletions(-)
WHATS_NEW_DM +1 -0
index efe8b37..f041ed1 100644
@@ -1,5 +1,6 @@
 Version 1.02.110 - 
 ======================================
+  Reworked thread initialization for dmeventd plugins.
   Dmeventd handles snapshot overflow for now equally as invalid.
   Convert dmeventd to use common logging macro system from libdm.
   Return -ENOMEM when device registration fails instead of 0 (=success).
daemons/dmeventd/dmeventd.c +85 -85

182 lines not on this page · raw message