From: Kern Sibbald Date: Fri, 27 Mar 2009 10:00:55 +0000 (+0000) Subject: Commit 2.4.4-label-failure patch X-Git-Tag: Release-3.0.0~93 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=47153bf413cab56580071305f4750a7e549e8212;p=bacula%2Fbacula Commit 2.4.4-label-failure patch git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8610 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/patches/2.4.4-label-failure.patch b/bacula/patches/2.4.4-label-failure.patch new file mode 100644 index 0000000000..3dc115776a --- /dev/null +++ b/bacula/patches/2.4.4-label-failure.patch @@ -0,0 +1,85 @@ + [label-failure.patch] IQ + This patch should fix the problems labeling a tape while + Bacula is requesting you to mount or label a new tape. + It should also fix problems where Bacula will not recognize + that a new tape is inserted or created and it keeps asking for + a different tape. It fixes bug #1227. + + Apply it to 2.4.4 (possibly earlier versions) with: + + cd + patch -p0 <2.4.4-label-failure.patch + ./configure + make + ... + make install + ... + + + +Index: src/stored/wait.c +=================================================================== +--- src/stored/wait.c (revision 8605) ++++ src/stored/wait.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. +@@ -20,7 +20,7 @@ + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. + +- Bacula® is a registered trademark of John Walker. ++ Bacula® is a registered trademark of Kern Sibbald. + The licensor of Bacula is the Free Software Foundation Europe + (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich, + Switzerland, email:ftf@fsfeurope.org. +@@ -62,8 +62,14 @@ + + dev->dlock(); + Dmsg1(dbglvl, "Enter blocked=%s\n", dev->print_blocked()); ++ ++ /* ++ * Since we want to mount a tape, make sure current one is ++ * not marked as using this drive. ++ */ ++ volume_unused(dcr); ++ + unmounted = is_device_unmounted(dev); +- + dev->poll = false; + /* + * Wait requested time (dev->rem_wait_sec). However, we also wake up every +Index: src/stored/reserve.c +=================================================================== +--- src/stored/reserve.c (revision 8605) ++++ src/stored/reserve.c (working copy) +@@ -20,7 +20,7 @@ + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. + +- Bacula® is a registered trademark of John Walker. ++ Bacula® is a registered trademark of Kern Sibbald. + The licensor of Bacula is the Free Software Foundation Europe + (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich, + Switzerland, email:ftf@fsfeurope.org. +@@ -346,8 +346,12 @@ + goto get_out; + } + Dmsg3(dbglvl, "jid=%u reserve_vol free vol=%s at %p\n", jid(), vol->vol_name, vol->vol_name); +- free_volume(dev); +- 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"); + } + }