From c3414cc27885b6a4cd7afdbf199e0ad0e9ee434b Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Sat, 20 Nov 2010 14:24:03 +0100 Subject: [PATCH] Pass Delta Sequence to save_pkt and restore_pkt --- bacula/src/filed/fd_plugins.c | 6 ++++++ bacula/src/filed/fd_plugins.h | 2 ++ 2 files changed, 8 insertions(+) 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 */ }; -- 2.39.5