diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2015-10-09 22:08:01 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2015-10-13 15:15:43 +0200 |
commit | 13086c2523a00bc8501113f56094312bda4881e1 (patch) | |
tree | b9837ec9ce2df499a6fb424bca1aa112dd4746fe | |
parent | 42a9c8b4a659a44bef1b3150eb6359d562938ca3 (diff) | |
download | lvm2-13086c2523a00bc8501113f56094312bda4881e1.tar.gz |
dmeventd: drop changing logging
As we now use 'unified' logging macro system - we no longer need
to protect from change of logging function pointer - it's set
once at the start of dmeventd and not change anymore
(as lvm2 library no longer interferers here).
-rw-r--r-- | daemons/dmeventd/dmeventd.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c index 6f25379a5..0acb91963 100644 --- a/daemons/dmeventd/dmeventd.c +++ b/daemons/dmeventd/dmeventd.c @@ -648,7 +648,6 @@ static sigset_t _unblock_sigalrm(void) /* Wait on a device until an event occurs. */ static int _event_wait(struct thread_status *thread, struct dm_task **task) { - static unsigned _in_event_counter = 0; sigset_t set; int ret = DM_WAIT_RETRY; struct dm_task *dmt; @@ -667,16 +666,11 @@ static int _event_wait(struct thread_status *thread, struct dm_task **task) !dm_task_set_event_nr(dmt, thread->event_nr)) goto out; - _lock_mutex(); /* * Check if there are already some waiting events, * in this case the logging is unmodified. * TODO: audit libdm thread usage */ - if (!_in_event_counter++) - dm_log_init(_dmeventd_log); - _unlock_mutex(); - DEBUGLOG("Starting waitevent task for %s", thread->device.uuid); /* * This is so that you can break out of waiting on an event, @@ -708,10 +702,6 @@ static int _event_wait(struct thread_status *thread, struct dm_task **task) DEBUGLOG("Completed waitevent task for %s", thread->device.uuid); pthread_sigmask(SIG_SETMASK, &set, NULL); - _lock_mutex(); - if (--_in_event_counter == 0) - dm_log_init(NULL); - _unlock_mutex(); out: if (ret == DM_WAIT_FATAL || ret == DM_WAIT_RETRY) { |