]> git.sur5r.net Git - bacula/bacula/commitdiff
dvd.c:dvd_write_part: Increase timeout when writing the first part (see the code...
authorNicolas Boichat <nicolas@boichat.ch>
Tue, 18 Oct 2005 23:11:52 +0000 (23:11 +0000)
committerNicolas Boichat <nicolas@boichat.ch>
Tue, 18 Oct 2005 23:11:52 +0000 (23:11 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2466 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/nb-1.37
bacula/src/stored/dvd.c

index 8951596e4292549f40e37a6f3394a9c99ff91f05..9bd055ccb53ebeecbd0545272f9bf0a86c25316c 100644 (file)
@@ -4,6 +4,9 @@
 General:
 
 Changes to 1.37.*:
+19Oct05
+ - dvd.c:dvd_write_part: Increase timeout when writing the first part (see the code for
+   more details).
 18Oct05
  - Modify .backups command to get a fileset parameter (fix bug #444).
 17Oct05
index 54ee86634727a9011a7f6e358222928a417373ca..578cbaaaf8b664a03f22862d9ad202719638a0b9 100644 (file)
@@ -349,10 +349,23 @@ bool dvd_write_part(DCR *dcr)
     * timeout = dev->max_open_wait + (dev->max_part_size/(1350*1024/2));
     * I modified this for a longer timeout; pre-formatting, blanking and
     * writing can take quite a while
-    *
-    * NB: Use part_size and not max_part_size, needed when you don't set max part size (so it defaults to 0)
     */
-   timeout = dev->max_open_wait + (dev->part_size/(1350*1024)*8);
+
+   /* Explanation of the timeout value, when writing the first part,
+    *  by Arno Lehmann :
+    * 9 GB, write speed 1x: 6990 seconds (almost 2 hours...)
+    * Overhead: 900 seconds (starting, initializing, finalizing,probably 
+    *   reloading 15 minutes)
+    * Sum: 15780.
+    * A reasonable last-exit timeout would be 16000 seconds. Quite long - 
+    * almost 4.5 hours, but hopefully, that timeout will only ever be needed 
+    * in case of a serious emergency.
+    */
+
+   if (dev->part == 0)
+      timeout = 16000;
+   else
+      timeout = dev->max_open_wait + (dev->part_size/(1350*1024/4));
 
    Dmsg2(29, "dvd_write_part: cmd=%s timeout=%d\n", ocmd.c_str(), timeout);