From 10ee7d6e10f749b3648b67bb61294d61289bb98d Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 28 Sep 2007 21:15:18 +0000 Subject: [PATCH] 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 --- bacula/src/stored/append.c | 2 +- bacula/technotes-2.3 | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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. -- 2.39.5