From: Eric Bollengier Date: Fri, 12 Mar 2010 10:24:21 +0000 (+0100) Subject: Add read_vol_list mutex to lockmgr prio X-Git-Tag: Release-5.2.1~1603 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6176c2100848b308d8addfb5a33a1fe7407deb07;p=bacula%2Fbacula Add read_vol_list mutex to lockmgr prio --- diff --git a/bacula/src/lib/mutex_list.h b/bacula/src/lib/mutex_list.h index 5b3e09460d..dc81a858b3 100644 --- a/bacula/src/lib/mutex_list.h +++ b/bacula/src/lib/mutex_list.h @@ -37,6 +37,7 @@ #define PRIO_SD_DEV_ACQUIRE 4 /* dev.acquire_mutex */ #define PRIO_SD_DEV_ACCESS 5 /* dev.m_mutex */ #define PRIO_SD_VOL_LIST 10 /* vol_list_lock */ +#define PRIO_SD_READ_VOL_LIST 12 /* read_vol_list */ #define PRIO_SD_DEV_SPOOL 14 /* dev.spool_mutex */ #endif diff --git a/bacula/src/stored/vol_mgr.c b/bacula/src/stored/vol_mgr.c index 6f0de21c41..5bc9ba840d 100644 --- a/bacula/src/stored/vol_mgr.c +++ b/bacula/src/stored/vol_mgr.c @@ -44,7 +44,7 @@ const int dbglvl = 150; static dlist *vol_list = NULL; static brwlock_t vol_list_lock; static dlist *read_vol_list = NULL; -static pthread_mutex_t read_vol_lock = PTHREAD_MUTEX_INITIALIZER; +static bthread_mutex_t read_vol_lock = BTHREAD_MUTEX_PRIORITY(PRIO_SD_READ_VOL_LIST); /* Forward referenced functions */ static void free_vol_item(VOLRES *vol);