2 This patch fixes two bugs:
3 1. It ignores an device open failure if polling.
4 2. It disables the insanity check on reading the
5 tape label while polling. Normally the check
6 doesn't allow the label to be read more than 100
9 Apply the patch to version 1.34.6 (possibly earlier versions) with:
12 patch -p0 <1.34.6-poll.patch
16 Index: src/stored/label.c
17 ===================================================================
18 RCS file: /cvsroot/bacula/bacula/src/stored/label.c,v
19 retrieving revision 1.42.2.1
20 diff -u -r1.42.2.1 label.c
21 --- src/stored/label.c 20 Jun 2004 11:43:04 -0000 1.42.2.1
22 +++ src/stored/label.c 2 Sep 2004 12:21:00 -0000
24 * Cancel Job if too many label errors
27 - if (jcr->label_errors++ > 100) {
28 - Jmsg(jcr, M_FATAL, 0, "%s", jcr->errmsg);
29 + if (!dev->poll && jcr->label_errors++ > 100) {
30 + Jmsg(jcr, M_FATAL, 0, "Too many tries: %s", jcr->errmsg);
32 return jcr->label_status = VOL_NAME_ERROR;
35 * Cancel Job if too many label errors
38 - if (jcr->label_errors++ > 100) {
39 - Jmsg(jcr, M_FATAL, 0, "%s", jcr->errmsg);
40 + if (!dev->poll && jcr->label_errors++ > 100) {
41 + Jmsg(jcr, M_FATAL, 0, "Too many tries: %s", jcr->errmsg);
43 return jcr->label_status = VOL_NAME_ERROR;
45 Index: src/stored/mount.c
46 ===================================================================
47 RCS file: /cvsroot/bacula/bacula/src/stored/mount.c,v
48 retrieving revision 1.59.2.1
49 diff -u -r1.59.2.1 mount.c
50 --- src/stored/mount.c 20 Jun 2004 11:43:04 -0000 1.59.2.1
51 +++ src/stored/mount.c 2 Sep 2004 12:21:00 -0000
54 /* Ensure the device is open */
55 if (!open_device(jcr, dev)) {
58 + goto mount_next_vol;