]> git.sur5r.net Git - bacula/bacula/commitdiff
Update doc
authorKern Sibbald <kern@sibbald.com>
Fri, 23 Apr 2004 20:49:07 +0000 (20:49 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 23 Apr 2004 20:49:07 +0000 (20:49 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1279 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/platforms/freebsd/pthreads-fix.txt
bacula/platforms/freebsd/tapetest.c
bacula/src/dird/dird.c
bacula/src/version.h

index 729b3df0f6ea29426cbdb1605cb3ab7d33a4f3fd..56641980894408d79a77ef0c9e5c4fcd81565658 100644 (file)
@@ -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 <bacula-source>
+  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 <bacula-source>/platforms/freebsd/tapetest.c
index 2629a409916c9bd820e129856d3c1ddb418f7dab..d3a5b1c479406a97ec903b9f729b78b2b5cd1fb0 100644 (file)
@@ -16,6 +16,7 @@
  *  rawfill
  *  rewind
  *  scan
+ *  quit
  *
  *  The output will be:
  * 
@@ -53,6 +54,7 @@
  *  rawfill
  *  rewind
  *  scan
+ *  quit
  *
  *  The output will be:
  *
  *    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).
  *
  *
  */
index 4274683567e5f159e6eae8de983049d5364cd786..b8ff96b8ace7cfeeee24913eb61fad7c74cfe9f7 100644 (file)
@@ -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()
index 2b3f37e45009d8344c78813be1ea114a83c3bb24..c0ebc39de321eae58f7b709abdcdb8cc32e969ed 100644 (file)
@@ -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