From: Eric Bollengier Date: Sat, 20 Nov 2010 13:24:03 +0000 (+0100) Subject: Pass Delta Sequence to save_pkt and restore_pkt X-Git-Tag: Release-5.2.1~920 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=349927323a18fcaf0c032f77120be9a763082258;p=bacula%2Fbacula Pass Delta Sequence to save_pkt and restore_pkt --- diff --git a/bacula/src/filed/fd_plugins.c b/bacula/src/filed/fd_plugins.c index 335d66a283..804019e9f2 100644 --- a/bacula/src/filed/fd_plugins.c +++ b/bacula/src/filed/fd_plugins.c @@ -396,6 +396,7 @@ int plugin_save(JCR *jcr, FF_PKT *ff_pkt, bool top_level) pm_strcpy(link, sp.link); ff_pkt->fname = fname.c_str(); ff_pkt->link = link.c_str(); + ff_pkt->delta_seq = sp.delta_seq; if (sp.flags & FO_DELTA) { ff_pkt->flags |= FO_DELTA; ff_pkt->delta_seq++; /* make new delta sequence number */ @@ -1339,6 +1340,11 @@ static bRC baculaCheckChanges(bpContext *ctx, struct save_pkt *sp) ret = bRC_Seen; } + /* check_changes() can update delta sequence number, return it to the + * plugin + */ + sp->delta_seq = ff_pkt->delta_seq; + bail_out: Dmsg1(100, "checkChanges=%i\n", ret); return ret; diff --git a/bacula/src/filed/fd_plugins.h b/bacula/src/filed/fd_plugins.h index 2564244319..9975a9f3e3 100644 --- a/bacula/src/filed/fd_plugins.h +++ b/bacula/src/filed/fd_plugins.h @@ -106,6 +106,7 @@ struct save_pkt { char *object; /* restore object data to save */ int32_t object_len; /* restore object length */ int32_t index; /* restore object index */ + int32_t delta_seq; /* Delta sequence number */ int32_t pkt_end; /* end packet sentinel */ }; @@ -128,6 +129,7 @@ struct restore_pkt { const char *RegexWhere; /* regex where */ int replace; /* replace flag */ int create_status; /* status from createFile() */ + int32_t delta_seq; /* Delta sequence number */ int32_t pkt_end; /* end packet sentinel */ };