device-mapper-multipath/0020-RHBZ-907360-static-pthread-init.patch
Benjamin Marzinski eaac563644 device-mapper-multipath-0.4.9-49
Modify 0020-RHBZ-907360-static-pthread-init.patch
  * Don't initialize uevent list twice
Add 0029-RH-no-prio-put-msg.patch
Add 0030-RHBZ-916528-override-queue-no-daemon.patch
  * Default to "queue_without_daemon no"
  * Add "forcequeueing daemon" and "restorequeueing daemon" cli commands
Modify spec file to force queue_without_daemon when restarting
  multipathd on upgrades.
2013-04-26 11:43:50 -05:00

42 lines
1.3 KiB
Diff

---
libmultipath/uevent.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
Index: multipath-tools-130222/libmultipath/uevent.c
===================================================================
--- multipath-tools-130222.orig/libmultipath/uevent.c
+++ multipath-tools-130222/libmultipath/uevent.c
@@ -53,8 +53,10 @@ typedef int (uev_trigger)(struct uevent
pthread_t uevq_thr;
LIST_HEAD(uevq);
-pthread_mutex_t uevq_lock, *uevq_lockp = &uevq_lock;
-pthread_cond_t uev_cond, *uev_condp = &uev_cond;
+pthread_mutex_t uevq_lock = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t *uevq_lockp = &uevq_lock;
+pthread_cond_t uev_cond = PTHREAD_COND_INITIALIZER;
+pthread_cond_t *uev_condp = &uev_cond;
uev_trigger *my_uev_trigger;
void * my_trigger_data;
int servicing_uev;
@@ -409,10 +411,6 @@ int uevent_listen(void)
* thereby not getting to empty the socket's receive buffer queue
* often enough.
*/
- INIT_LIST_HEAD(&uevq);
-
- pthread_mutex_init(uevq_lockp, NULL);
- pthread_cond_init(uev_condp, NULL);
pthread_cleanup_push(uevq_stop, NULL);
monitor = udev_monitor_new_from_netlink(conf->udev, "udev");
@@ -525,8 +523,6 @@ out:
if (need_failback)
err = failback_listen();
pthread_cleanup_pop(1);
- pthread_mutex_destroy(uevq_lockp);
- pthread_cond_destroy(uev_condp);
return err;
}