]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/device.c
Extend idea of Prefer Mounted Volumes to mean a volume about
[bacula/bacula] / bacula / src / stored / device.c
index 7215c35cfcfc626c90f15de8dc443fa9507bf92a..b654f28cd528251282d8070999e6ec29b9397f7f 100644 (file)
@@ -352,6 +352,7 @@ bool is_device_unmounted(DEVICE *dev)
    return stat;
 }
 
+#ifdef SD_DEBUG_LOCK
 void DEVICE::_dlock(const char *file, int line)
 {
    Dmsg4(sd_dbglvl, "dlock from %s:%d precnt=%d JobId=%u\n", file, line,
@@ -375,16 +376,11 @@ void DEVICE::_dunlock(const char *file, int line)
    V(m_mutex);   
 }
 
-#ifdef SD_DEBUG_LOCK
 void DEVICE::_r_dunlock(const char *file, int line)
 {
    this->_dunlock(file, line);
 }
-#else
-void DEVICE::r_dunlock()
-{
-   this->dunlock();
-}
+
 #endif
 
 
@@ -435,11 +431,10 @@ void DEVICE::r_dlock()
  */
 void _block_device(const char *file, int line, DEVICE *dev, int state)
 {
-   Dmsg3(sd_dbglvl, "block set %d from %s:%d\n", state, file, line);
-
    ASSERT(dev->blocked() == BST_NOT_BLOCKED);
    dev->set_blocked(state);           /* make other threads wait */
    dev->no_wait_id = pthread_self();  /* allow us to continue */
+   Dmsg3(sd_dbglvl, "set blocked=%s from %s:%d\n", dev->print_blocked(), file, line);
 }
 
 /*