From a43d2e768028f060bcdb2eb2672b598c36ab47fc Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 11 Apr 2009 12:35:04 +0000 Subject: [PATCH] Modify insertion of read Volumes in SD to be done before the drive reservation. This ensures that a Volume to be read will not be reserved for writing. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8713 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/{Patchnotes-2.5 => Patchnotes} | 1 + .../{ => 2.4.x}/2.4.4-bat-install.patch | 0 .../{ => 2.4.x}/2.4.4-jobname-edit.patch | 0 .../{ => 2.4.x}/2.4.4-label-failure.patch | 0 bacula/patches/{ => 2.4.x}/2.4.4-reload.patch | 0 .../{ => 2.4.x}/2.4.4-sd-deadlock.patch | 0 .../{ => 2.4.x}/2.4.4-time_t_64bit.patch | 0 .../{ => 2.4.x}/2.4.4-tray-sizing.patch | 0 bacula/patches/3.0.0-read-vol-list.patch | 282 ++++++++++++++++++ bacula/src/dird/migrate.c | 7 +- bacula/src/dird/msgchan.c | 13 +- bacula/src/dird/protos.h | 3 +- bacula/src/dird/vbackup.c | 9 +- bacula/src/stored/acquire.c | 6 +- bacula/src/stored/fd_cmds.c | 2 + bacula/src/stored/job.c | 2 + bacula/src/stored/mac.c | 5 - bacula/src/stored/parse_bsr.c | 2 +- bacula/src/stored/read.c | 7 +- bacula/src/stored/vol_mgr.c | 1 + bacula/src/version.h | 4 +- bacula/technotes | 6 + 22 files changed, 315 insertions(+), 35 deletions(-) rename bacula/{Patchnotes-2.5 => Patchnotes} (71%) rename bacula/patches/{ => 2.4.x}/2.4.4-bat-install.patch (100%) rename bacula/patches/{ => 2.4.x}/2.4.4-jobname-edit.patch (100%) rename bacula/patches/{ => 2.4.x}/2.4.4-label-failure.patch (100%) rename bacula/patches/{ => 2.4.x}/2.4.4-reload.patch (100%) rename bacula/patches/{ => 2.4.x}/2.4.4-sd-deadlock.patch (100%) rename bacula/patches/{ => 2.4.x}/2.4.4-time_t_64bit.patch (100%) rename bacula/patches/{ => 2.4.x}/2.4.4-tray-sizing.patch (100%) create mode 100644 bacula/patches/3.0.0-read-vol-list.patch diff --git a/bacula/Patchnotes-2.5 b/bacula/Patchnotes similarity index 71% rename from bacula/Patchnotes-2.5 rename to bacula/Patchnotes index 3c12a6fbe3..304387cdf7 100644 --- a/bacula/Patchnotes-2.5 +++ b/bacula/Patchnotes @@ -2,3 +2,4 @@ Patches Committed: +3.0.0-read-vol-list.patch diff --git a/bacula/patches/2.4.4-bat-install.patch b/bacula/patches/2.4.x/2.4.4-bat-install.patch similarity index 100% rename from bacula/patches/2.4.4-bat-install.patch rename to bacula/patches/2.4.x/2.4.4-bat-install.patch diff --git a/bacula/patches/2.4.4-jobname-edit.patch b/bacula/patches/2.4.x/2.4.4-jobname-edit.patch similarity index 100% rename from bacula/patches/2.4.4-jobname-edit.patch rename to bacula/patches/2.4.x/2.4.4-jobname-edit.patch diff --git a/bacula/patches/2.4.4-label-failure.patch b/bacula/patches/2.4.x/2.4.4-label-failure.patch similarity index 100% rename from bacula/patches/2.4.4-label-failure.patch rename to bacula/patches/2.4.x/2.4.4-label-failure.patch diff --git a/bacula/patches/2.4.4-reload.patch b/bacula/patches/2.4.x/2.4.4-reload.patch similarity index 100% rename from bacula/patches/2.4.4-reload.patch rename to bacula/patches/2.4.x/2.4.4-reload.patch diff --git a/bacula/patches/2.4.4-sd-deadlock.patch b/bacula/patches/2.4.x/2.4.4-sd-deadlock.patch similarity index 100% rename from bacula/patches/2.4.4-sd-deadlock.patch rename to bacula/patches/2.4.x/2.4.4-sd-deadlock.patch diff --git a/bacula/patches/2.4.4-time_t_64bit.patch b/bacula/patches/2.4.x/2.4.4-time_t_64bit.patch similarity index 100% rename from bacula/patches/2.4.4-time_t_64bit.patch rename to bacula/patches/2.4.x/2.4.4-time_t_64bit.patch diff --git a/bacula/patches/2.4.4-tray-sizing.patch b/bacula/patches/2.4.x/2.4.4-tray-sizing.patch similarity index 100% rename from bacula/patches/2.4.4-tray-sizing.patch rename to bacula/patches/2.4.x/2.4.4-tray-sizing.patch diff --git a/bacula/patches/3.0.0-read-vol-list.patch b/bacula/patches/3.0.0-read-vol-list.patch new file mode 100644 index 0000000000..de1cfea600 --- /dev/null +++ b/bacula/patches/3.0.0-read-vol-list.patch @@ -0,0 +1,282 @@ + + This patch can be applied to version 3.0.0. It ensures that the list + of volumes to be read is created very early when starting the Job in + the SD (before the drive reservation) so that any Volume to be read + cannot also be chosen to append. + + Apply it to version 3.0.0 with: + + cd + patch -p0 <3.0.0-read-vol-list.patch + ./configure + make + ... + make install + + + +Index: src/dird/msgchan.c +=================================================================== +--- src/dird/msgchan.c (revision 8699) ++++ src/dird/msgchan.c (working copy) +@@ -144,10 +144,12 @@ + } + #endif + ++static char OKbootstrap[] = "3000 OK bootstrap\n"; ++ + /* + * Start a job with the Storage daemon + */ +-bool start_storage_daemon_job(JCR *jcr, alist *rstore, alist *wstore) ++bool start_storage_daemon_job(JCR *jcr, alist *rstore, alist *wstore, bool send_bsr) + { + bool ok = true; + STORE *storage; +@@ -196,7 +198,7 @@ + &jcr->VolSessionTime, &auth_key) != 3) { + Dmsg1(100, "BadJob=%s\n", sd->msg); + Jmsg(jcr, M_FATAL, 0, _("Storage daemon rejected Job command: %s\n"), sd->msg); +- return 0; ++ return false; + } else { + jcr->sd_auth_key = bstrdup(auth_key); + Dmsg1(150, "sd_auth_key=%s\n", jcr->sd_auth_key); +@@ -204,9 +206,14 @@ + } else { + Jmsg(jcr, M_FATAL, 0, _("bstrerror()); +- return 0; ++ return false; + } + ++ if (send_bsr && (!send_bootstrap_file(jcr, sd) || ++ !response(jcr, sd, OKbootstrap, "Bootstrap", DISPLAY_ERROR))) { ++ return false; ++ } ++ + /* + * We have two loops here. The first comes from the + * Storage = associated with the Job, and we need +Index: src/dird/migrate.c +=================================================================== +--- src/dird/migrate.c (revision 8699) ++++ src/dird/migrate.c (working copy) +@@ -55,7 +55,6 @@ + + static const int dbglevel = 10; + +-static char OKbootstrap[] = "3000 OK bootstrap\n"; + static int get_job_to_migrate(JCR *jcr); + struct idpkt; + static bool regex_find_jobids(JCR *jcr, idpkt *ids, const char *query1, +@@ -353,15 +352,11 @@ + ((STORE *)jcr->rstorage->first())->name()); + return false; + } +- if (!start_storage_daemon_job(jcr, jcr->rstorage, jcr->wstorage)) { ++ if (!start_storage_daemon_job(jcr, jcr->rstorage, jcr->wstorage, /*send_bsr*/true)) { + return false; + } + Dmsg0(150, "Storage daemon connection OK\n"); + +- if (!send_bootstrap_file(jcr, sd) || +- !response(jcr, sd, OKbootstrap, "Bootstrap", DISPLAY_ERROR)) { +- return false; +- } + + /* + * We re-update the job start record so that the start +Index: src/dird/protos.h +=================================================================== +--- src/dird/protos.h (revision 8699) ++++ src/dird/protos.h (working copy) +@@ -155,7 +155,8 @@ + /* msgchan.c */ + extern bool connect_to_storage_daemon(JCR *jcr, int retry_interval, + int max_retry_time, int verbose); +-extern bool start_storage_daemon_job(JCR *jcr, alist *rstore, alist *wstore); ++extern bool start_storage_daemon_job(JCR *jcr, alist *rstore, alist *wstore, ++ bool send_bsr=false); + extern bool start_storage_daemon_message_thread(JCR *jcr); + extern int bget_dirmsg(BSOCK *bs); + extern void wait_for_storage_daemon_termination(JCR *jcr); +Index: src/dird/vbackup.c +=================================================================== +--- src/dird/vbackup.c (revision 8699) ++++ src/dird/vbackup.c (working copy) +@@ -50,8 +50,6 @@ + + static const int dbglevel = 10; + +-static char OKbootstrap[] = "3000 OK bootstrap\n"; +- + static bool create_bootstrap_file(JCR *jcr, POOLMEM *jobids); + void vbackup_cleanup(JCR *jcr, int TermCode); + +@@ -217,16 +215,11 @@ + /* + * Now start a job with the Storage daemon + */ +- if (!start_storage_daemon_job(jcr, jcr->rstorage, jcr->wstorage)) { ++ if (!start_storage_daemon_job(jcr, jcr->rstorage, jcr->wstorage, /*send_bsr*/true)) { + return false; + } + Dmsg0(100, "Storage daemon connection OK\n"); + +- if (!send_bootstrap_file(jcr, sd) || +- !response(jcr, sd, OKbootstrap, "Bootstrap", DISPLAY_ERROR)) { +- return false; +- } +- + /* + * We re-update the job start record so that the start + * time is set after the run before job. This avoids +Index: src/stored/fd_cmds.c +=================================================================== +--- src/stored/fd_cmds.c (revision 8699) ++++ src/stored/fd_cmds.c (working copy) +@@ -388,6 +388,8 @@ + if (debug_level >= 10) { + dump_bsr(jcr->bsr, true); + } ++ /* If we got a bootstrap, we are reading, so create read volume list */ ++ create_restore_volume_list(jcr); + ok = true; + + bail_out: +Index: src/stored/read.c +=================================================================== +--- src/stored/read.c (revision 8699) ++++ src/stored/read.c (working copy) +@@ -1,7 +1,7 @@ + /* + Bacula® - The Network Backup Solution + +- Copyright (C) 2000-2008 Free Software Foundation Europe e.V. ++ Copyright (C) 2000-2009 Free Software Foundation Europe e.V. + + The main author of Bacula is Kern Sibbald, with contributions from + many others, a complete list can be found in the file AUTHORS. +@@ -62,11 +62,8 @@ + return false; + } + +- +- create_restore_volume_list(jcr); + if (jcr->NumReadVolumes == 0) { + Jmsg(jcr, M_FATAL, 0, _("No Volume names found for restore.\n")); +- free_restore_volume_list(jcr); + fd->fsend(FD_error); + return false; + } +@@ -76,7 +73,6 @@ + + /* Ready device for reading */ + if (!acquire_device_for_read(dcr)) { +- free_restore_volume_list(jcr); + fd->fsend(FD_error); + return false; + } +@@ -92,7 +88,6 @@ + ok = false; + } + +- free_restore_volume_list(jcr); + Dmsg0(30, "Done reading.\n"); + return ok; + } +Index: src/stored/parse_bsr.c +=================================================================== +--- src/stored/parse_bsr.c (revision 8699) ++++ src/stored/parse_bsr.c (working copy) +@@ -1,7 +1,7 @@ + /* + Bacula® - The Network Backup Solution + +- Copyright (C) 2002-2008 Free Software Foundation Europe e.V. ++ Copyright (C) 2002-2009 Free Software Foundation Europe e.V. + + The main author of Bacula is Kern Sibbald, with contributions from + many others, a complete list can be found in the file AUTHORS. +Index: src/stored/mac.c +=================================================================== +--- src/stored/mac.c (revision 8699) ++++ src/stored/mac.c (working copy) +@@ -84,8 +84,6 @@ + } + Dmsg2(100, "read_dcr=%p write_dcr=%p\n", jcr->read_dcr, jcr->dcr); + +- +- create_restore_volume_list(jcr); + if (jcr->NumReadVolumes == 0) { + Jmsg(jcr, M_FATAL, 0, _("No Volume names found for %s.\n"), Type); + goto bail_out; +@@ -161,11 +159,8 @@ + } + } + +- free_restore_volume_list(jcr); +- + dir_send_job_status(jcr); /* update director */ + +- + Dmsg0(30, "Done reading.\n"); + jcr->end_time = time(NULL); + dequeue_messages(jcr); /* send any queued messages */ +Index: src/stored/vol_mgr.c +=================================================================== +--- src/stored/vol_mgr.c (revision 8699) ++++ src/stored/vol_mgr.c (working copy) +@@ -529,6 +529,7 @@ + VOLRES vol, *fvol; + + if (read_vol_list->empty()) { ++ Dmsg0(dbglvl, "find_read_vol: read_vol_list empty.\n"); + return NULL; + } + /* Do not lock reservations here */ +Index: src/stored/job.c +=================================================================== +--- src/stored/job.c (revision 8699) ++++ src/stored/job.c (working copy) +@@ -371,6 +371,8 @@ + free_bsr(jcr->bsr); + jcr->bsr = NULL; + } ++ /* Free any restore volume list created */ ++ free_restore_volume_list(jcr); + if (jcr->RestoreBootstrap) { + unlink(jcr->RestoreBootstrap); + free_pool_memory(jcr->RestoreBootstrap); +Index: src/stored/acquire.c +=================================================================== +--- src/stored/acquire.c (revision 8699) ++++ src/stored/acquire.c (working copy) +@@ -187,7 +187,7 @@ + if (!dir_get_volume_info(dcr, GET_VOL_INFO_FOR_READ)) { + Dmsg2(150, "dir_get_vol_info failed for vol=%s: %s\n", + dcr->VolumeName, jcr->errmsg); +- Jmsg1(jcr, M_WARNING, 0, "%s", jcr->errmsg); ++ Jmsg1(jcr, M_WARNING, 0, "Read acquire: %s", jcr->errmsg); + } + dev->set_load(); /* set to load volume */ + +@@ -241,7 +241,7 @@ + * error messages when nothing is mounted. + */ + if (tape_previously_mounted) { +- Jmsg(jcr, M_WARNING, 0, "%s", jcr->errmsg); ++ Jmsg(jcr, M_WARNING, 0, "Read acquire: %s", jcr->errmsg); + } + goto default_path; + case VOL_NAME_ERROR: +@@ -257,7 +257,7 @@ + dev->set_load(); + /* Fall through */ + default: +- Jmsg1(jcr, M_WARNING, 0, "%s", jcr->errmsg); ++ Jmsg1(jcr, M_WARNING, 0, "Read acquire: %s", jcr->errmsg); + default_path: + Dmsg0(50, "default path\n"); + tape_previously_mounted = true; diff --git a/bacula/src/dird/migrate.c b/bacula/src/dird/migrate.c index fc49cb74ef..4521cf02aa 100644 --- a/bacula/src/dird/migrate.c +++ b/bacula/src/dird/migrate.c @@ -55,7 +55,6 @@ static const int dbglevel = 10; -static char OKbootstrap[] = "3000 OK bootstrap\n"; static int get_job_to_migrate(JCR *jcr); struct idpkt; static bool regex_find_jobids(JCR *jcr, idpkt *ids, const char *query1, @@ -353,15 +352,11 @@ bool do_migration(JCR *jcr) ((STORE *)jcr->rstorage->first())->name()); return false; } - if (!start_storage_daemon_job(jcr, jcr->rstorage, jcr->wstorage)) { + if (!start_storage_daemon_job(jcr, jcr->rstorage, jcr->wstorage, /*send_bsr*/true)) { return false; } Dmsg0(150, "Storage daemon connection OK\n"); - if (!send_bootstrap_file(jcr, sd) || - !response(jcr, sd, OKbootstrap, "Bootstrap", DISPLAY_ERROR)) { - return false; - } /* * We re-update the job start record so that the start diff --git a/bacula/src/dird/msgchan.c b/bacula/src/dird/msgchan.c index f9cc3a2113..1955ccc093 100644 --- a/bacula/src/dird/msgchan.c +++ b/bacula/src/dird/msgchan.c @@ -144,10 +144,12 @@ bool update_device_res(JCR *jcr, DEVICE *dev) } #endif +static char OKbootstrap[] = "3000 OK bootstrap\n"; + /* * Start a job with the Storage daemon */ -bool start_storage_daemon_job(JCR *jcr, alist *rstore, alist *wstore) +bool start_storage_daemon_job(JCR *jcr, alist *rstore, alist *wstore, bool send_bsr) { bool ok = true; STORE *storage; @@ -196,7 +198,7 @@ bool start_storage_daemon_job(JCR *jcr, alist *rstore, alist *wstore) &jcr->VolSessionTime, &auth_key) != 3) { Dmsg1(100, "BadJob=%s\n", sd->msg); Jmsg(jcr, M_FATAL, 0, _("Storage daemon rejected Job command: %s\n"), sd->msg); - return 0; + return false; } else { jcr->sd_auth_key = bstrdup(auth_key); Dmsg1(150, "sd_auth_key=%s\n", jcr->sd_auth_key); @@ -204,7 +206,12 @@ bool start_storage_daemon_job(JCR *jcr, alist *rstore, alist *wstore) } else { Jmsg(jcr, M_FATAL, 0, _("bstrerror()); - return 0; + return false; + } + + if (send_bsr && (!send_bootstrap_file(jcr, sd) || + !response(jcr, sd, OKbootstrap, "Bootstrap", DISPLAY_ERROR))) { + return false; } /* diff --git a/bacula/src/dird/protos.h b/bacula/src/dird/protos.h index 26e5d71944..dc66f8d3c5 100644 --- a/bacula/src/dird/protos.h +++ b/bacula/src/dird/protos.h @@ -155,7 +155,8 @@ extern void mount_request(JCR *jcr, BSOCK *bs, char *buf); /* msgchan.c */ extern bool connect_to_storage_daemon(JCR *jcr, int retry_interval, int max_retry_time, int verbose); -extern bool start_storage_daemon_job(JCR *jcr, alist *rstore, alist *wstore); +extern bool start_storage_daemon_job(JCR *jcr, alist *rstore, alist *wstore, + bool send_bsr=false); extern bool start_storage_daemon_message_thread(JCR *jcr); extern int bget_dirmsg(BSOCK *bs); extern void wait_for_storage_daemon_termination(JCR *jcr); diff --git a/bacula/src/dird/vbackup.c b/bacula/src/dird/vbackup.c index 9ae9c65d06..45a1f7e065 100644 --- a/bacula/src/dird/vbackup.c +++ b/bacula/src/dird/vbackup.c @@ -50,8 +50,6 @@ static const int dbglevel = 10; -static char OKbootstrap[] = "3000 OK bootstrap\n"; - static bool create_bootstrap_file(JCR *jcr, POOLMEM *jobids); void vbackup_cleanup(JCR *jcr, int TermCode); @@ -217,16 +215,11 @@ _("This Job is not an Accurate backup so is not equivalent to a Full backup.\n") /* * Now start a job with the Storage daemon */ - if (!start_storage_daemon_job(jcr, jcr->rstorage, jcr->wstorage)) { + if (!start_storage_daemon_job(jcr, jcr->rstorage, jcr->wstorage, /*send_bsr*/true)) { return false; } Dmsg0(100, "Storage daemon connection OK\n"); - if (!send_bootstrap_file(jcr, sd) || - !response(jcr, sd, OKbootstrap, "Bootstrap", DISPLAY_ERROR)) { - return false; - } - /* * We re-update the job start record so that the start * time is set after the run before job. This avoids diff --git a/bacula/src/stored/acquire.c b/bacula/src/stored/acquire.c index 06c280efd8..50e767b611 100644 --- a/bacula/src/stored/acquire.c +++ b/bacula/src/stored/acquire.c @@ -187,7 +187,7 @@ bool acquire_device_for_read(DCR *dcr) if (!dir_get_volume_info(dcr, GET_VOL_INFO_FOR_READ)) { Dmsg2(150, "dir_get_vol_info failed for vol=%s: %s\n", dcr->VolumeName, jcr->errmsg); - Jmsg1(jcr, M_WARNING, 0, "%s", jcr->errmsg); + Jmsg1(jcr, M_WARNING, 0, "Read acquire: %s", jcr->errmsg); } dev->set_load(); /* set to load volume */ @@ -241,7 +241,7 @@ bool acquire_device_for_read(DCR *dcr) * error messages when nothing is mounted. */ if (tape_previously_mounted) { - Jmsg(jcr, M_WARNING, 0, "%s", jcr->errmsg); + Jmsg(jcr, M_WARNING, 0, "Read acquire: %s", jcr->errmsg); } goto default_path; case VOL_NAME_ERROR: @@ -257,7 +257,7 @@ bool acquire_device_for_read(DCR *dcr) dev->set_load(); /* Fall through */ default: - Jmsg1(jcr, M_WARNING, 0, "%s", jcr->errmsg); + Jmsg1(jcr, M_WARNING, 0, "Read acquire: %s", jcr->errmsg); default_path: Dmsg0(50, "default path\n"); tape_previously_mounted = true; diff --git a/bacula/src/stored/fd_cmds.c b/bacula/src/stored/fd_cmds.c index 993bf1a872..88223497b6 100644 --- a/bacula/src/stored/fd_cmds.c +++ b/bacula/src/stored/fd_cmds.c @@ -388,6 +388,8 @@ bool get_bootstrap_file(JCR *jcr, BSOCK *sock) if (debug_level >= 10) { dump_bsr(jcr->bsr, true); } + /* If we got a bootstrap, we are reading, so create read volume list */ + create_restore_volume_list(jcr); ok = true; bail_out: diff --git a/bacula/src/stored/job.c b/bacula/src/stored/job.c index 8b5add3f58..de9b2bb50c 100644 --- a/bacula/src/stored/job.c +++ b/bacula/src/stored/job.c @@ -371,6 +371,8 @@ void stored_free_jcr(JCR *jcr) free_bsr(jcr->bsr); jcr->bsr = NULL; } + /* Free any restore volume list created */ + free_restore_volume_list(jcr); if (jcr->RestoreBootstrap) { unlink(jcr->RestoreBootstrap); free_pool_memory(jcr->RestoreBootstrap); diff --git a/bacula/src/stored/mac.c b/bacula/src/stored/mac.c index b7768a811f..ce2c370797 100644 --- a/bacula/src/stored/mac.c +++ b/bacula/src/stored/mac.c @@ -84,8 +84,6 @@ bool do_mac(JCR *jcr) } Dmsg2(100, "read_dcr=%p write_dcr=%p\n", jcr->read_dcr, jcr->dcr); - - create_restore_volume_list(jcr); if (jcr->NumReadVolumes == 0) { Jmsg(jcr, M_FATAL, 0, _("No Volume names found for %s.\n"), Type); goto bail_out; @@ -161,11 +159,8 @@ ok_out: } } - free_restore_volume_list(jcr); - dir_send_job_status(jcr); /* update director */ - Dmsg0(30, "Done reading.\n"); jcr->end_time = time(NULL); dequeue_messages(jcr); /* send any queued messages */ diff --git a/bacula/src/stored/parse_bsr.c b/bacula/src/stored/parse_bsr.c index 3798435217..f5e0108de2 100644 --- a/bacula/src/stored/parse_bsr.c +++ b/bacula/src/stored/parse_bsr.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2002-2008 Free Software Foundation Europe e.V. + Copyright (C) 2002-2009 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. diff --git a/bacula/src/stored/read.c b/bacula/src/stored/read.c index aa0ae70567..7d50550902 100644 --- a/bacula/src/stored/read.c +++ b/bacula/src/stored/read.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2008 Free Software Foundation Europe e.V. + Copyright (C) 2000-2009 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -62,11 +62,8 @@ bool do_read_data(JCR *jcr) return false; } - - create_restore_volume_list(jcr); if (jcr->NumReadVolumes == 0) { Jmsg(jcr, M_FATAL, 0, _("No Volume names found for restore.\n")); - free_restore_volume_list(jcr); fd->fsend(FD_error); return false; } @@ -76,7 +73,6 @@ bool do_read_data(JCR *jcr) /* Ready device for reading */ if (!acquire_device_for_read(dcr)) { - free_restore_volume_list(jcr); fd->fsend(FD_error); return false; } @@ -92,7 +88,6 @@ bool do_read_data(JCR *jcr) ok = false; } - free_restore_volume_list(jcr); Dmsg0(30, "Done reading.\n"); return ok; } diff --git a/bacula/src/stored/vol_mgr.c b/bacula/src/stored/vol_mgr.c index 54b00b8148..4e239fcd7c 100644 --- a/bacula/src/stored/vol_mgr.c +++ b/bacula/src/stored/vol_mgr.c @@ -529,6 +529,7 @@ static VOLRES *find_read_volume(const char *VolumeName) VOLRES vol, *fvol; if (read_vol_list->empty()) { + Dmsg0(dbglvl, "find_read_vol: read_vol_list empty.\n"); return NULL; } /* Do not lock reservations here */ diff --git a/bacula/src/version.h b/bacula/src/version.h index 451395303d..d73cbb05b4 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -4,8 +4,8 @@ #undef VERSION #define VERSION "3.0.0" -#define BDATE "06 April 2009" -#define LSMDATE "06Apr09" +#define BDATE "11 April 2009" +#define LSMDATE "11Apr09" #define PROG_COPYRIGHT "Copyright (C) %d-2009 Free Software Foundation Europe e.V.\n" #define BYEAR "2009" /* year for copyright messages in progs */ diff --git a/bacula/technotes b/bacula/technotes index 6ee0b779f6..c6a118c0ce 100644 --- a/bacula/technotes +++ b/bacula/technotes @@ -2,6 +2,12 @@ General: +11Apr09 +kes Modify insertion of read Volumes in SD to be done before the + drive reservation. This ensures that a Volume to be read will not + be reserved for writing. + +Release Version 3.0.0 06Apr09 kes Change default plugins dir to /usr/lib. 05Apr09 -- 2.39.5