]> git.sur5r.net Git - bacula/bacula/commitdiff
Mark that a file was found in the accurate list in the ff_pkt with a new variable
authorEric Bollengier <eric@baculasystems.com>
Wed, 18 Jan 2012 09:15:13 +0000 (10:15 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:50:28 +0000 (14:50 +0200)
bacula/src/filed/accurate.c
bacula/src/filed/fd_plugins.c
bacula/src/filed/fd_plugins.h
bacula/src/findlib/find.h

index aeaa29e220357138bed65740b614bfa7764d2521..8bdc7a6c515cf8d9bbf6cb174f25136090488511 100644 (file)
@@ -258,7 +258,8 @@ bool accurate_check_file(JCR *jcr, FF_PKT *ff_pkt)
    char *fname;
    CurFile elt;
 
-   ff_pkt->delta_seq = -1;
+   ff_pkt->delta_seq = 0;
+   ff_pkt->accurate_found = false;
 
    if (!jcr->accurate && !jcr->rerunning) {
       return true;
@@ -278,6 +279,7 @@ bool accurate_check_file(JCR *jcr, FF_PKT *ff_pkt)
       goto bail_out;
    }
 
+   ff_pkt->accurate_found = true;
    ff_pkt->delta_seq = elt.delta_seq;
 
    if (elt.seen) { /* file has been seen ? */
index 3fba6cc8b19a106af69c6606f80eb8127c235545..7ea9930d92a948c3984738df720558b1073bcdc7 100644 (file)
@@ -359,6 +359,7 @@ bRC plugin_option_handle_file(JCR *jcr, FF_PKT *ff_pkt, struct save_pkt *sp)
    sp->statp = ff_pkt->statp;
    sp->fname = ff_pkt->fname;
    sp->delta_seq = ff_pkt->delta_seq;
+   sp->accurate_found = ff_pkt->accurate_found;
 
    if (!bplugin_list || !jcr->plugin_ctx_list || jcr->is_job_canceled()) {
       Jmsg1(jcr, M_FATAL, 0, "Command plugin \"%s\" requested, but is not loaded.\n", cmd);
@@ -1636,6 +1637,7 @@ static bRC baculaCheckChanges(bpContext *ctx, struct save_pkt *sp)
     * plugin 
     */
    sp->delta_seq = ff_pkt->delta_seq;
+   sp->accurate_found = ff_pkt->accurate_found;
 
 bail_out:
    Dmsg1(100, "checkChanges=%i\n", ret);
index 3c8fa7d493ef6f9bfededb60d7d4296bbc55b527..dfb0d93d9698cd192e2c0ca452b11a857a293b0b 100644 (file)
@@ -102,6 +102,7 @@ struct save_pkt {
    int32_t type;                      /* FT_xx for this file */             
    uint32_t flags;                    /* Bacula internal flags */
    bool portable;                     /* set if data format is portable */
+   bool accurate_found;               /* Found in accurate list (valid after check_changes()) */
    char *cmd;                         /* command */
    uint32_t delta_seq;                /* Delta sequence number */
    char *object_name;                 /* Object name to create */
index fddd0fc83272a29e80da3bbbbd98ebd91780deb3..da504c27a343e83285cf5f1206433c1513b5e27d 100644 (file)
@@ -184,6 +184,7 @@ struct FF_PKT {
    int ff_errno;                      /* errno */
    BFILE bfd;                         /* Bacula file descriptor */
    time_t save_time;                  /* start of incremental time */
+   bool accurate_found;               /* Found in the accurate hash (valid after check_changes()) */
    bool dereference;                  /* follow links (not implemented) */
    bool null_output_device;           /* using null output device */
    bool incremental;                  /* incremental save */