]> git.pld-linux.org Git - packages/bacula.git/blob - bacula-2.4.4-label-failure.patch
- official bacula patches for 2.4.4
[packages/bacula.git] / bacula-2.4.4-label-failure.patch
1                                                              [label-failure.patch] IQ
2  This patch should fix the problems labeling a tape while
3  Bacula is requesting you to mount or label a new tape.
4  It should also fix problems where Bacula will not recognize
5  that a new tape is inserted or created and it keeps asking for
6  a different tape. It fixes bug #1227.
7
8  Apply it to 2.4.4 (possibly earlier versions) with:
9
10  cd <bacula-source>
11  patch -p0 <2.4.4-label-failure.patch
12  ./configure <your-options>
13  make
14  ...
15  make install
16  ...
17
18
19
20 Index: src/stored/wait.c
21 ===================================================================
22 --- src/stored/wait.c   (revision 8605)
23 +++ src/stored/wait.c   (working copy)
24 @@ -1,7 +1,7 @@
25  /*
26     Bacula® - The Network Backup Solution
27  
28 -   Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
29 +   Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
30  
31     The main author of Bacula is Kern Sibbald, with contributions from
32     many others, a complete list can be found in the file AUTHORS.
33 @@ -20,7 +20,7 @@
34     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
35     02110-1301, USA.
36  
37 -   Bacula® is a registered trademark of John Walker.
38 +   Bacula® is a registered trademark of Kern Sibbald.
39     The licensor of Bacula is the Free Software Foundation Europe
40     (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
41     Switzerland, email:ftf@fsfeurope.org.
42 @@ -62,8 +62,14 @@
43  
44     dev->dlock();  
45     Dmsg1(dbglvl, "Enter blocked=%s\n", dev->print_blocked());
46 +
47 +   /*
48 +    * Since we want to mount a tape, make sure current one is
49 +    *  not marked as using this drive.
50 +    */
51 +   volume_unused(dcr);
52 +
53     unmounted = is_device_unmounted(dev);
54 -
55     dev->poll = false;
56     /*
57      * Wait requested time (dev->rem_wait_sec).  However, we also wake up every
58 Index: src/stored/reserve.c
59 ===================================================================
60 --- src/stored/reserve.c        (revision 8605)
61 +++ src/stored/reserve.c        (working copy)
62 @@ -20,7 +20,7 @@
63     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
64     02110-1301, USA.
65  
66 -   Bacula® is a registered trademark of John Walker.
67 +   Bacula® is a registered trademark of Kern Sibbald.
68     The licensor of Bacula is the Free Software Foundation Europe
69     (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
70     Switzerland, email:ftf@fsfeurope.org.
71 @@ -346,8 +346,12 @@
72              goto get_out;
73           }
74           Dmsg3(dbglvl, "jid=%u reserve_vol free vol=%s at %p\n", jid(), vol->vol_name, vol->vol_name);
75 -         free_volume(dev);
76 -         dev->set_unload();             /* have to unload current volume */
77 +         /* If old Volume is still mounted, must unload it */
78 +         if (strcmp(vol->vol_name, dev->VolHdr.VolumeName) == 0) {
79 +            Dmsg0(50, "set_unload\n");
80 +            dev->set_unload();          /* have to unload current volume */
81 +         }
82 +         free_volume(dev);              /* Release old volume entry */
83           debug_list_volumes("reserve_vol free");
84        }
85     }
This page took 0.031478 seconds and 3 git commands to generate.