2 This patch fixes a race condition where a Job is terminating at the same
3 time that another job reaches the end of Volume. In that case, sometimes
4 the last block or two are not written to the Volume. This seems to be
5 relatively rare, but does result in data loss. This fixes bug #964.
7 Apply the patch to Bacula version 2.2.4 (or possibly any previous 2.2.x
11 patch -p0 <2.2.4-lost-block.patch
12 ./configure (your options)
18 Index: src/stored/append.c
19 ===================================================================
20 --- src/stored/append.c (revision 5602)
21 +++ src/stored/append.c (working copy)
23 * Check if we can still write. This may not be the case
24 * if we are at the end of the tape or we got a fatal I/O error.
26 - if (dev->can_write()) {
27 + if (ok || dev->can_write()) {
28 if (!write_session_label(dcr, EOS_LABEL)) {
29 Jmsg1(jcr, M_FATAL, 0, _("Error writting end session label. ERR=%s\n"),