From 11720bbbdab037d57ddbdb11c14e68b191d631fb Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 20 Mar 2009 14:52:17 +0000 Subject: [PATCH] Second half of proposed fix for bug #1227 that does not mark virtual volumes for unloading. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8561 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/stored/ansi_label.c | 3 ++- bacula/src/stored/askdir.c | 2 +- bacula/src/stored/mount.c | 2 +- bacula/src/stored/reserve.c | 2 +- bacula/src/stored/vol_mgr.c | 11 +++++++---- bacula/technotes-2.5 | 28 +++++++++++++++------------- 6 files changed, 27 insertions(+), 21 deletions(-) diff --git a/bacula/src/stored/ansi_label.c b/bacula/src/stored/ansi_label.c index 6a8fa41829..3c0e749237 100644 --- a/bacula/src/stored/ansi_label.c +++ b/bacula/src/stored/ansi_label.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2005-2007 Free Software Foundation Europe e.V. + Copyright (C) 2005-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. @@ -148,6 +148,7 @@ int read_ansi_ibm_label(DCR *dcr) } *q = 0; Dmsg0(100, "Call reserve_volume\n"); + /* ***FIXME*** why is this reserve_volume() needed???? KES */ reserve_volume(dcr, dev->VolHdr.VolumeName); dev = dcr->dev; /* may have changed in reserve_volume */ Dmsg2(100, "Wanted ANSI Vol %s got %6s\n", VolName, dev->VolHdr.VolumeName); diff --git a/bacula/src/stored/askdir.c b/bacula/src/stored/askdir.c index 3deb5bce46..0066636412 100644 --- a/bacula/src/stored/askdir.c +++ b/bacula/src/stored/askdir.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. diff --git a/bacula/src/stored/mount.c b/bacula/src/stored/mount.c index c18506d865..06d48b36d1 100644 --- a/bacula/src/stored/mount.c +++ b/bacula/src/stored/mount.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/reserve.c b/bacula/src/stored/reserve.c index 41c3ce07c5..e373e8dcaa 100644 --- a/bacula/src/stored/reserve.c +++ b/bacula/src/stored/reserve.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. diff --git a/bacula/src/stored/vol_mgr.c b/bacula/src/stored/vol_mgr.c index 95d906ad9f..54b00b8148 100644 --- a/bacula/src/stored/vol_mgr.c +++ b/bacula/src/stored/vol_mgr.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. @@ -380,9 +380,12 @@ VOLRES *reserve_volume(DCR *dcr, const char *VolumeName) goto get_out; } Dmsg2(dbglvl, "reserve_vol free vol=%s at %p\n", vol->vol_name, vol->vol_name); - free_volume(dev); - Dmsg0(50, "set_unload\n"); - dev->set_unload(); /* have to unload current volume */ + /* If old Volume is still mounted, must unload it */ + if (strcmp(vol->vol_name, dev->VolHdr.VolumeName) == 0) { + Dmsg0(50, "set_unload\n"); + dev->set_unload(); /* have to unload current volume */ + } + free_volume(dev); /* Release old volume entry */ debug_list_volumes("reserve_vol free"); } } diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index e4c449a8ca..9fd223c165 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -23,20 +23,20 @@ bpipe fd plugin Exchange plugin --New features to be documented: --Update src/plugins/README --command separator in console (!$%&'()*+,-/:;<>?[]^`{|}~) --examples/database/dbcheck.sql --enhancement to wait command: wait mount ... --dbport in dbcheck --filepattern (restore with regex in bsr) --Allow Mixed Priorities Kjetil Torgrim Homme 30Jun08 --Eliminated license problems with OpenSSL. +New features to be documented: +- Update src/plugins/README +- command separator in console (!$%&'()*+,-/:;<>?[]^`{|}~) +- examples/database/dbcheck.sql +- enhancement to wait command: wait mount ... +- dbport in dbcheck +- filepattern (restore with regex in bsr) +- Allow Mixed Priorities Kjetil Torgrim Homme 30Jun08 +- Eliminated license problems with OpenSSL. - The exchange plugin truncates the exchange logs as soon as it has -sent the data to the sd. If the sd is spooling and something -goes wrong and the data doesn't make it to the backup medium then -the logs are lost, which could be a problem under some -restore scenarios. + sent the data to the sd. If the sd is spooling and something + goes wrong and the data doesn't make it to the backup medium then + the logs are lost, which could be a problem under some + restore scenarios. - Regex filtered bsrs Kjetil Torgrim Homme 15Aug08 Code to be completed before 3.0.0 is released: @@ -50,6 +50,8 @@ Code to be completed before 3.0.0 is released: General: 20Mar09 +kes Second half of proposed fix for bug #1227 that does not + mark virtual volumes for unloading. kes Proposed fix for bug #1227 Job and labeling new tape. Beta release 2.5.42-b2 -- 2.39.5