]> git.sur5r.net Git - bacula/bacula/commitdiff
Add timer to FIFO read/write opens
authorKern Sibbald <kern@sibbald.com>
Wed, 22 Jan 2003 13:57:18 +0000 (13:57 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 22 Jan 2003 13:57:18 +0000 (13:57 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@312 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/kernstodo
bacula/scripts/Makefile.in
bacula/src/filed/backup.c
bacula/src/findlib/create_file.c
bacula/src/lib/watchdog.c
bacula/src/version.h

index 59a39d1415bccae963ef23f860a08954030955eb..2d07db1ba1b1748ebc25eb5862728cc104c8f39a 100644 (file)
@@ -17,26 +17,23 @@ Testing to do: (painful)
 - blocksize recognition code.
 
 For 1.29 release:
+- Add whereabslinks to where or not where absolute links
+
+For 1.30 release:
+- Get correct error status from run_program or open_bpipe().
 - Look at handling <> in smtp doesn't work with exim.
-- InitVerify is getting pruned and it shouldn't
 - Priority job to go to top of list.
 - Implement Bar code handling
 - Why is catreq.c:111 Find vol called twice for a job?
 - Find out why Full saves run slower and slower (hashing?)
-- Make 1.28c release ???
-- Make sure btraceback goes into /sbin not sysconf directory.
-- Get correct error status from run_program or open_bpipe().
-- Figure out how to allow multiple simultaneous file Volumes on
-  a single device.
+- Figure out how to allow multiple simultaneous file Volumes on a single device.
 - Why are save/restore of device different sizes (sparse?)   Yup! Fix it.
-
 - Implement some way for the Console to dynamically create a job.
 - Restore to a particular time -- e.g. before date, after date. 
 - Implement SHA1
 - Implement disk spooling
 - Implement finer multiprocessing options.
 - Solaris -I on tar for include list
-- Add whereabslinks to where or not where absolute links
 - Enable avoid backing up archive device (findlib/find_one.c:128)
 - Implement FileOptions (see end of this document)
 - Implement Bacula plugins -- design API
@@ -824,3 +821,7 @@ Done: (see kernsdone for more)
   (not necessary)
 - Rewrite find_one.c to use only pool_memory instead of 
   alloca and malloc (probably not necessary).
+- Make sure btraceback goes into /sbin not sysconf directory.
+- InitVerify is getting pruned and it shouldn't (document it)
+- Make 1.28c release ??? NO do 1.29 directly
+- Set timeout on opening fifo for save or restore (findlib)
index 4aee059888cbf9e473a610d98a003105a0610913..c6471f10687d767822623233ab00778d14b3a7d6 100755 (executable)
@@ -28,6 +28,7 @@ depend:
 
 installdirs:
        $(MKDIR) $(DESTDIR)$(sysconfdir)
+       $(MKDIR) $(DESTDIR)$(sbindir)
 
 install: installdirs
        $(INSTALL_SCRIPT) startmysql $(DESTDIR)$(sysconfdir)/startmysql
@@ -36,8 +37,8 @@ install: installdirs
        $(INSTALL_SCRIPT) bacula $(DESTDIR)$(sysconfdir)/bacula
        $(INSTALL_SCRIPT) fd $(DESTDIR)$(sysconfdir)/fd
        $(INSTALL_SCRIPT) mtx-changer $(DESTDIR)$(sysconfdir)/mtx-changer
-       $(INSTALL_SCRIPT) btraceback $(DESTDIR)$(sysconfdir)/btraceback
-       $(INSTALL_DATA)   btraceback.gdb $(DESTDIR)$(sysconfdir)/btraceback.gdb
+       $(INSTALL_SCRIPT) btraceback $(DESTDIR)$(sbindir)/btraceback
+       $(INSTALL_DATA)   btraceback.gdb $(DESTDIR)$(sbindir)/btraceback.gdb
 
 uninstall:
        (cd $(DESTDIR)$(sysconfdir); $(RMF) startmysql)
@@ -46,8 +47,8 @@ uninstall:
        (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula)
        (cd $(DESTDIR)$(sysconfdir); $(RMF) fd)
        (cd $(DESTDIR)$(sysconfdir); $(RMF) mtx-changer)
-       (cd $(DESTDIR)$(sysconfdir); $(RMF) btraceback)
-       (cd $(DESTDIR)$(sysconfdir); $(RMF) btraceback.gdb)
+       (cd $(DESTDIR)$(sbindir); $(RMF) btraceback)
+       (cd $(DESTDIR)$(sbindir); $(RMF) btraceback.gdb)
 
 Makefile: Makefile.in
        cd $(topdir) \
index 9dca295e71617df8e012ce4eeea0bf531ef2c180..4d7e0092291b6d409ad0d75c9cc63d16a1229962 100644 (file)
@@ -176,11 +176,19 @@ static int save_file(FF_PKT *ff_pkt, void *ijcr)
    if (ff_pkt->type != FT_LNKSAVED && (S_ISREG(ff_pkt->statp.st_mode) && 
         ff_pkt->statp.st_size > 0) || 
         ff_pkt->type == FT_RAW || ff_pkt->type == FT_FIFO) {
+      btimer_id tid;   
+      if (ff_pkt->type == FT_FIFO) {
+        tid = start_thread_timer(pthread_self(), 60);
+      } else {
+        tid = NULL;
+      }
       if ((ff_pkt->fid = open(ff_pkt->fname, O_RDONLY | O_BINARY)) < 0) {
         ff_pkt->ff_errno = errno;
          Jmsg(jcr, M_NOTSAVED, -1, _("     Cannot open %s: ERR=%s.\n"), ff_pkt->fname, strerror(ff_pkt->ff_errno));
+        stop_thread_timer(tid);
         return 1;
       }
+      stop_thread_timer(tid);
    } else {
       ff_pkt->fid = -1;
    }
index beb60185ddaba9b712bd4c65043d57e9b678cfbe..c9fc477d26002a8f57ca6350262474162d29d714 100644 (file)
@@ -198,12 +198,21 @@ int create_file(void *jcr, char *fname, char *ofile, char *lname,
         }
       }       
       if (type == FT_RAW || type == FT_FIFO) {
+        btimer_id tid;
          Dmsg1(200, "FT_RAW|FT_FIFO %s\n", ofile);
         mode =  O_WRONLY | O_BINARY;
+        /* Timeout open() in 60 seconds */
+        if (type == FT_FIFO) {
+           tid = start_thread_timer(pthread_self(), 60);
+        } else {
+           tid = NULL;
+        }
         if ((*ofd = open(ofile, mode)) < 0) {
             Jmsg2(jcr, M_ERROR, 0, _("Could not open %s: ERR=%s\n"), ofile, strerror(errno));
+           stop_thread_timer(tid);
            return CF_ERROR;
         }
+        stop_thread_timer(tid);
         return CF_EXTRACT;
       }
       Dmsg1(200, "FT_SPEC %s\n", ofile);
index 214f45892d82e194d2b2f863fbd277077f27e9f2..a1c9146774934a1fcdb74ede8921aa3596b98285 100755 (executable)
@@ -298,6 +298,9 @@ void stop_child_timer(btimer_id wid)
  */
 void stop_thread_timer(btimer_id wid)
 {
+   if (!wid) {
+      return;
+   }
    Dmsg2(200, "Stop thread timer 0x%x for %d secs.\n", wid, wid->wait);
    stop_btimer(wid);        
 }
index fb1d7ebe23cadd5c23e163c0d9cd737cdee3c453..574824762de1b4115250c650b39dad515e07a232 100644 (file)
@@ -1,8 +1,8 @@
 /* */
 #define VERSION "1.29"
 #define VSTRING "1"
-#define DATE    "20 January 2003"
-#define LSMDATE "20Jan03"
+#define DATE    "22 January 2003"
+#define LSMDATE "22Jan03"
 
 /* Debug flags */
 #define DEBUG 1