]> git.sur5r.net Git - bacula/bacula/commitdiff
kes Re-enable code to remember last volume mounted on a non-tape
authorKern Sibbald <kern@sibbald.com>
Tue, 1 Apr 2008 09:31:06 +0000 (09:31 +0000)
committerKern Sibbald <kern@sibbald.com>
Tue, 1 Apr 2008 09:31:06 +0000 (09:31 +0000)
     Autochanger.
kes  Add patch supplied in bug #1068 that fixes a SD crash when using
     a Virtual autochanger.
kes  Generate correct JobMedia records during spooling/despooling when
     running concurrent jobs.  Thanks to Tom Ivar Helbekkmo
     <tih@hamartun.priv.no> for excellent analysis and testing.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.2@6710 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/stored/autochanger.c
bacula/src/stored/btape.c
bacula/src/stored/reserve.c
bacula/src/stored/spool.c
bacula/src/win32/build-depkgs-mingw32
bacula/technotes-2.1

index d04171d28ab2e6cd5fd49e2c8d1ba6714bbfb1fd..866ede83433fcd64a98f3a06cc3db8b98aa7a898 100644 (file)
@@ -333,6 +333,11 @@ bool unload_autochanger(DCR *dcr, int loaded)
       return false;
    }
 
+   /* Virtual disk autochanger */
+   if (dcr->device->changer_command[0] == 0) {
+      return true;
+   }
+
    if (loaded < 0) {
       loaded = get_autochanger_loaded_slot(dcr);
    }
index d9b6a471fa86c152328db0f5966309cab784e5c4..aa55a7ba0924ab0c464527a3d98fe44749b78306 100644 (file)
@@ -2731,7 +2731,7 @@ static bool my_mount_next_read_volume(DCR *dcr)
    Pmsg2(000, _("End of Volume \"%s\" %d records.\n"), dcr->VolumeName,
       quickie_count);
 
-   volume_unused(dcr);
+   volume_unused(dcr);             /* release current volume */
    if (LastBlock != block->BlockNumber) {
       VolBytes += block->block_len;
    }
index bc102f2d1b4d8431612492ede3de09b834580276..131ddd12bae4d39ed3b7fa25d22fb176280ed3d9 100644 (file)
@@ -519,7 +519,7 @@ bool volume_unused(DCR *dcr)
     *  where the tapes are or last were.
     */
    dev->vol->released = true;
-   if (dev->is_tape()) { // || dev->is_autochanger()) {
+   if (dev->is_tape() || dev->is_autochanger()) {
       return true;
    } else {
       /*
index 25eb7c12d54047a3d3a4ef5fd0dfbfe42ca5f2f9..6e18b12a85d6fda05274e34ed047dbab6c223467 100644 (file)
@@ -276,6 +276,8 @@ static bool despool_data(DCR *dcr, bool commit)
    /* Add run time, to get current wait time */
    time_t despool_start = time(NULL) - jcr->run_time;
 
+   set_new_file_parameters(dcr);
+
    for ( ; ok; ) {
       if (job_canceled(jcr)) {
          ok = false;
@@ -296,6 +298,13 @@ static bool despool_data(DCR *dcr, bool commit)
       Dmsg3(800, "Write block ok=%d FI=%d LI=%d\n", ok, block->FirstIndex, block->LastIndex);
    }
 
+   if (!dir_create_jobmedia_record(dcr)) {
+      Jmsg(jcr, M_FATAL, 0, _("Could not create JobMedia record for Volume=\"%s\" Job=%s\n"),
+         dcr->VolCatInfo.VolCatName, jcr->Job);
+   }
+   /* Set new file/block parameters for current dcr */
+   set_new_file_parameters(dcr);
+
    /* Subtracting run_time give us elapsed time - wait_time since we started despooling */
    time_t despool_elapsed = time(NULL) - despool_start - jcr->run_time;
 
index 046813ac6c80960d142ee6748c4fc68b5b1df9b6..74a3f5af72546705f85da0775509978a236835d6 100755 (executable)
@@ -230,6 +230,10 @@ process_openssl()
                        --with-zlib-include=${DEPPKG_DIR}/include \
                        mingw32 > make.log 2>&1
    fi
+# 
+# add the following to the above for 3.0.0
+#                      no-idea no-mdc2 no-rc5 \
+#
    echo Building openssl
    perl util/mkdef.pl 32 libeay no-static-engine >ms/libeay32.def
    perl util/mkdef.pl 32 ssleay >ms/ssleay32.def
index c883629a571609c1759dfb336bdbabae61342956..ca4128625ed4551f58408acdafd89f5dcc1c6917 100644 (file)
@@ -1,6 +1,15 @@
               Technical notes on version 2.2
 
 General:
+01Apr08
+kes  Re-enable code to remember last volume mounted on a non-tape
+     Autochanger.
+kes  Add patch supplied in bug #1068 that fixes a SD crash when using
+     a Virtual autochanger.
+kes  Generate correct JobMedia records during spooling/despooling when
+     running concurrent jobs.  Thanks to Tom Ivar Helbekkmo 
+     <tih@hamartun.priv.no> for excellent analysis and testing.
+
 Beta release Version 2.2.9-b3
 27Mar08
 kes  Rework certain SD locking based on gdb tracebacks of deadlocks