From: Kern Sibbald Date: Fri, 28 Sep 2007 21:15:18 +0000 (+0000) Subject: Fix race condition that drops final block written to volume. X-Git-Tag: Release-3.0.0~2422 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=abb4b7304a6893d965fa140d558c99ed5f65d08a;p=bacula%2Fbacula Fix race condition that drops final block written to volume. This happens in rare cases with multiple simultaneous jobs when the Volume fills. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5684 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/stored/append.c b/bacula/src/stored/append.c index 6519c70123..972b14bb4c 100644 --- a/bacula/src/stored/append.c +++ b/bacula/src/stored/append.c @@ -287,7 +287,7 @@ bool do_append_data(JCR *jcr) * Check if we can still write. This may not be the case * if we are at the end of the tape or we got a fatal I/O error. */ - if (dev->can_write()) { + if (ok || dev->can_write()) { if (!write_session_label(dcr, EOS_LABEL)) { Jmsg1(jcr, M_FATAL, 0, _("Error writting end session label. ERR=%s\n"), dev->bstrerror()); diff --git a/bacula/technotes-2.3 b/bacula/technotes-2.3 index f1c537019c..6d7d711f7c 100644 --- a/bacula/technotes-2.3 +++ b/bacula/technotes-2.3 @@ -2,6 +2,9 @@ General: 28Sep07 +kes Fix race condition that drops final block written to volume. + This happens in rare cases with multiple simultaneous jobs + when the Volume fills. kes Eliminate more strerror() and replace with bstrerror(). kes Remove BSD getopt and replace with unrestricted IBM version kes Fix Win32 build.