From 1bf487945197db1b1f8ff4cef8de2e1a6c360f86 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 1 Apr 2008 09:31:06 +0000 Subject: [PATCH] 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 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 | 5 +++++ bacula/src/stored/btape.c | 2 +- bacula/src/stored/reserve.c | 2 +- bacula/src/stored/spool.c | 9 +++++++++ bacula/src/win32/build-depkgs-mingw32 | 4 ++++ bacula/technotes-2.1 | 9 +++++++++ 6 files changed, 29 insertions(+), 2 deletions(-) diff --git a/bacula/src/stored/autochanger.c b/bacula/src/stored/autochanger.c index d04171d28a..866ede8343 100644 --- a/bacula/src/stored/autochanger.c +++ b/bacula/src/stored/autochanger.c @@ -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); } diff --git a/bacula/src/stored/btape.c b/bacula/src/stored/btape.c index d9b6a471fa..aa55a7ba09 100644 --- a/bacula/src/stored/btape.c +++ b/bacula/src/stored/btape.c @@ -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; } diff --git a/bacula/src/stored/reserve.c b/bacula/src/stored/reserve.c index bc102f2d1b..131ddd12ba 100644 --- a/bacula/src/stored/reserve.c +++ b/bacula/src/stored/reserve.c @@ -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 { /* diff --git a/bacula/src/stored/spool.c b/bacula/src/stored/spool.c index 25eb7c12d5..6e18b12a85 100644 --- a/bacula/src/stored/spool.c +++ b/bacula/src/stored/spool.c @@ -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; diff --git a/bacula/src/win32/build-depkgs-mingw32 b/bacula/src/win32/build-depkgs-mingw32 index 046813ac6c..74a3f5af72 100755 --- a/bacula/src/win32/build-depkgs-mingw32 +++ b/bacula/src/win32/build-depkgs-mingw32 @@ -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 diff --git a/bacula/technotes-2.1 b/bacula/technotes-2.1 index c883629a57..ca4128625e 100644 --- a/bacula/technotes-2.1 +++ b/bacula/technotes-2.1 @@ -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 + for excellent analysis and testing. + Beta release Version 2.2.9-b3 27Mar08 kes Rework certain SD locking based on gdb tracebacks of deadlocks -- 2.39.5