From 8fdeb2935c75c1911305dbe22861bb898522076b Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 23 Apr 2004 20:49:07 +0000 Subject: [PATCH] Update doc git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1279 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/platforms/freebsd/pthreads-fix.txt | 35 ++++++++++++++++------- bacula/platforms/freebsd/tapetest.c | 8 ++++-- bacula/src/dird/dird.c | 4 ++- bacula/src/version.h | 4 +-- 4 files changed, 36 insertions(+), 15 deletions(-) diff --git a/bacula/platforms/freebsd/pthreads-fix.txt b/bacula/platforms/freebsd/pthreads-fix.txt index 729b3df0f6..5664198089 100644 --- a/bacula/platforms/freebsd/pthreads-fix.txt +++ b/bacula/platforms/freebsd/pthreads-fix.txt @@ -10,7 +10,9 @@ FreeBSD pthreads library. A solution has been found. PROBLEM DESCRIPTION: The FreeBSD pthreads library does not properly handle End Of Tape. -This problem will be fixed in FreeBSD 4.9. The bug results in more +This problem will be fixed in FreeBSD 4.9. (note, the problem +was apparently not fixed in 4.9, and version prior to 4.10-RELEASE +and 5.2.1-RELEASE need to be patched. The bug results in more data being written to the tape than could be read. Any backup which involved more than one tape would be incomplete. @@ -90,18 +92,22 @@ This tests with pthreads: * Total files=1, blocks=17913, bytes = 1155603456 * ======== * - * which is incroorect because it wrote 17,926 blocks but read - * back only 17,913 blocks + * which is incorrect because it wrote 17,926 blocks but read + * back only 17,913 blocks AND the status on the last block + * written was -1 when it should have been 0. If you get the same number of blocks written and read WHEN using -pthreads, then you've been correctly patched. +pthreads, and the test with pthreads enabled returns a stat=0 +on the last write, and the scan operation returns no error +code, then you've been correctly patched. SOLUTION: -For FreeBSD prior to and including 4.9, you have two choices to ensure proper -backups. These instructions assume you are familiar with patching -FreeBSD and already have the FreeBSD source code installed on your -machine. +For FreeBSD prior to and including 4.9, in other words, for +FreeBSD prior to 4.10-RELEASE and 5.2.1-RELEASE you have two +choices to ensure proper backups. These instructions assume you +are familiar with patching FreeBSD and already have the FreeBSD +source code installed on your machine. Do one of the following: @@ -114,14 +120,20 @@ Do one of the following: To apply the patch, follow these instructions as root. - fetch -o pthread.diff http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc_r/uthread/uthread_write.c.diff?r1=1.16.2.6\&r2=1.16.2.8 + fetch -o pthread.diff 'http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc_r/uthread/uthread_write.c.diff?r1=1.16.2.6&r2=1.16.2.8' cd /usr/src/lib/libc_r/uthread/ patch < /path/to/pthread.diff cd .. make all install -I recommend restarting Bacula. +You should then recompile Bacula to get the new library +code included by doing: + + cd + make clean + make + ... TESTING: @@ -129,3 +141,6 @@ TESTING: I suggest running tapetest on your patched system and then conducting a backup which spans two tapes. Restore the data and compare to the original. If not identical, please let us know. + +tapetest.c can also be found in the Bacula source distribution +in /platforms/freebsd/tapetest.c diff --git a/bacula/platforms/freebsd/tapetest.c b/bacula/platforms/freebsd/tapetest.c index 2629a40991..d3a5b1c479 100644 --- a/bacula/platforms/freebsd/tapetest.c +++ b/bacula/platforms/freebsd/tapetest.c @@ -16,6 +16,7 @@ * rawfill * rewind * scan + * quit * * The output will be: * @@ -53,6 +54,7 @@ * rawfill * rewind * scan + * quit * * The output will be: * @@ -72,8 +74,10 @@ * Total files=1, blocks=17913, bytes = 1155603456 * ======== * - * which is incorrect because it wrote 17,926 blocks but read - * back only 17,913 blocks. + * which is incroorect because it wrote 17,926 blocks but read + * back only 17,913 blocks, AND because the return status on + * the last block written was -1 when it should have been + * 0 (ie. stat=0 above). * * */ diff --git a/bacula/src/dird/dird.c b/bacula/src/dird/dird.c index 4274683567..b8ff96b8ac 100644 --- a/bacula/src/dird/dird.c +++ b/bacula/src/dird/dird.c @@ -215,7 +215,7 @@ int main (int argc, char *argv[]) drop(uid, gid); /* reduce priveleges if requested */ - signal(SIGHUP, reload_config); + /* signal(SIGHUP, reload_config); */ init_console_msg(working_directory); @@ -312,6 +312,7 @@ static void free_saved_resources(int table) */ static void reload_job_end_cb(JCR *jcr) { +#ifdef working int i = jcr->reload_id - 1; Dmsg1(000, "reload job_end JobId=%d\n", jcr->JobId); lock_jcr_chain(); @@ -321,6 +322,7 @@ static void reload_job_end_cb(JCR *jcr) } UnlockRes(); unlock_jcr_chain(); +#endif } static int find_free_table() diff --git a/bacula/src/version.h b/bacula/src/version.h index 2b3f37e450..c0ebc39de3 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -2,8 +2,8 @@ #undef VERSION #define VERSION "1.34.2" #define VSTRING "1" -#define BDATE "22 Apr 2004" -#define LSMDATE "22Apr04" +#define BDATE "24 Apr 2004" +#define LSMDATE "24Apr04" /* Debug flags */ #undef DEBUG -- 2.39.5