From: Eric Bollengier Date: Wed, 18 Jan 2012 09:15:13 +0000 (+0100) Subject: Mark that a file was found in the accurate list in the ff_pkt with a new variable X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=09b9ce0ddaec0e305667d17d6c63822ed19cfeb1;p=bacula%2Fbacula Mark that a file was found in the accurate list in the ff_pkt with a new variable --- diff --git a/bacula/src/filed/accurate.c b/bacula/src/filed/accurate.c index aeaa29e220..8bdc7a6c51 100644 --- a/bacula/src/filed/accurate.c +++ b/bacula/src/filed/accurate.c @@ -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 ? */ diff --git a/bacula/src/filed/fd_plugins.c b/bacula/src/filed/fd_plugins.c index 3fba6cc8b1..7ea9930d92 100644 --- a/bacula/src/filed/fd_plugins.c +++ b/bacula/src/filed/fd_plugins.c @@ -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); diff --git a/bacula/src/filed/fd_plugins.h b/bacula/src/filed/fd_plugins.h index 3c8fa7d493..dfb0d93d96 100644 --- a/bacula/src/filed/fd_plugins.h +++ b/bacula/src/filed/fd_plugins.h @@ -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 */ diff --git a/bacula/src/findlib/find.h b/bacula/src/findlib/find.h index fddd0fc832..da504c27a3 100644 --- a/bacula/src/findlib/find.h +++ b/bacula/src/findlib/find.h @@ -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 */