]> git.sur5r.net Git - bacula/bacula/commitdiff
Rework SD mount.c locking again
authorKern Sibbald <kern@sibbald.com>
Sat, 3 Apr 2010 18:56:42 +0000 (20:56 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Mon, 2 Aug 2010 14:49:44 +0000 (16:49 +0200)
bacula/src/stored/autochanger.c
bacula/src/stored/mount.c

index a0d7e99fc70cdff3605b921af081dc05d976b4d9..713d6ad28bdcb6c48fa70fcbc3068937f9767a11 100644 (file)
@@ -463,7 +463,7 @@ bool unload_dev(DCR *dcr, DEVICE *dev)
    save_slot = dcr->VolCatInfo.Slot;
    dcr->VolCatInfo.Slot = dev->get_slot();
 
-   dev->dlock();
+//   dev->dlock();
 
    POOLMEM *changer_cmd = get_pool_memory(PM_FNAME);
    POOL_MEM results(PM_MESSAGE);
@@ -503,7 +503,7 @@ bool unload_dev(DCR *dcr, DEVICE *dev)
    }
    unlock_changer(dcr);
 
-   dev->dunlock();
+//   dev->dunlock();
 
    free_volume(dev);               /* Free any volume associated with this drive */
    free_pool_memory(changer_cmd);
index 774c63c3b01291435f76a2cef54b8efe099adf42..1c9f884bcec4c1a662b8b7a1f5afd8e08435630a 100644 (file)
@@ -109,12 +109,12 @@ mount_next_vol:
    if (dev->must_unload()) {
       ask = true;                     /* ask operator to mount tape */
    }
-   unlock_volumes();
+//   unlock_volumes();
    do_unload();
    do_swapping(true /*is_writing*/);
    do_load(true /*is_writing*/);
 
-   lock_volumes();
+//   lock_volumes();
    if (!find_a_volume()) {
       goto no_lock_bail_out;
    }
@@ -136,7 +136,7 @@ mount_next_vol:
     * and move the tape to the end of data.
     *
     */
-   unlock_volumes();
+//   unlock_volumes();
    dcr->setVolCatInfo(false);   /* out of date when Vols unlocked */
    if (autoload_device(dcr, true/*writing*/, NULL) > 0) {
       autochanger = true;
@@ -146,7 +146,7 @@ mount_next_vol:
       VolCatInfo.Slot = 0;
       ask = retry >= 2;
    }
-   lock_volumes();
+//   lock_volumes();
    Dmsg1(150, "autoload_dev returns %d\n", autochanger);
    /*
     * If we autochanged to correct Volume or (we have not just