From: Eric Bollengier Date: Wed, 6 Jul 2011 14:45:37 +0000 (+0200) Subject: Add mutex priority check for changer mutex X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0a0fd1a2aec0c592564f0964ee68752545b72929;p=bacula%2Fbacula Add mutex priority check for changer mutex --- diff --git a/bacula/src/lib/mutex_list.h b/bacula/src/lib/mutex_list.h index 47ec077d5a..b3f51a2ef3 100644 --- a/bacula/src/lib/mutex_list.h +++ b/bacula/src/lib/mutex_list.h @@ -39,5 +39,6 @@ #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 */ +#define PRIO_SD_ACH_ACCESS 16 /* autochanger lock mutex */ #endif diff --git a/bacula/src/stored/stored_conf.c b/bacula/src/stored/stored_conf.c index a9fc44da5d..c15e8a9fb1 100644 --- a/bacula/src/stored/stored_conf.c +++ b/bacula/src/stored/stored_conf.c @@ -630,7 +630,9 @@ void save_resource(int type, RES_ITEM *items, int pass) foreach_alist(dev, res->res_changer.device) { dev->changer_res = (AUTOCHANGER *)&res->res_changer; } - if ((errstat = rwl_init(&res->res_changer.changer_lock)) != 0) { + if ((errstat = rwl_init(&res->res_changer.changer_lock, + PRIO_SD_ACH_ACCESS)) != 0) + { berrno be; Jmsg1(NULL, M_ERROR_TERM, 0, _("Unable to init lock: ERR=%s\n"), be.bstrerror(errstat));