]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/dev.c
Move reservations message lock to lock jcr only this
[bacula/bacula] / bacula / src / stored / dev.c
index 394fd177ad85d212a97c2f5062e81828d6c6c792..08dc97f67a4281b73ce888124d235b73742f2ec4 100644 (file)
@@ -781,44 +781,6 @@ bool DEVICE::rewind(DCR *dcr)
    return true;
 }
 
-void DEVICE::block(int why)
-{
-   r_dlock();              /* need recursive lock to block */
-   block_device(this, why);
-   r_dunlock();
-}
-
-void DEVICE::unblock(bool locked)
-{
-   if (!locked) {
-      dlock();
-   }
-   unblock_device(this);
-   dunlock();
-}
-
-
-const char *DEVICE::print_blocked() const 
-{
-   switch (m_blocked) {
-   case BST_NOT_BLOCKED:
-      return "BST_NOT_BLOCKED";
-   case BST_UNMOUNTED:
-      return "BST_UNMOUNTED";
-   case BST_WAITING_FOR_SYSOP:
-      return "BST_WAITING_FOR_SYSOP";
-   case BST_DOING_ACQUIRE:
-      return "BST_DOING_ACQUIRE";
-   case BST_WRITING_LABEL:
-      return "BST_WRITING_LABEL";
-   case BST_UNMOUNTED_WAITING_FOR_SYSOP:
-      return "BST_UNMOUNTED_WAITING_FOR_SYSOP";
-   case BST_MOUNT:
-      return "BST_MOUNT";
-   default:
-      return _("unknown blocked code");
-   }
-}
 
 /*
  * Called to indicate that we have just read an
@@ -1856,10 +1818,6 @@ void DEVICE::clrerror(int func)
  */
 void DEVICE::clear_volhdr()
 {
-   /* If we have an unused volume associated with this drive, free it */
-   if (vol && !is_busy()) {
-      free_volume(this);
-   }
    Dmsg1(100, "Clear volhdr vol=%s\n", VolHdr.VolumeName);
    memset(&VolHdr, 0, sizeof(VolHdr));
 }