From 33939dcde38389373e7ed8b12c6e9916b39411d0 Mon Sep 17 00:00:00 2001 From: Jeff Darcy Date: Wed, 5 Feb 2014 19:01:23 +0000 Subject: Example of how to add extra info to changelog records. This is a bit hacky so far, but this is the direction we need to go for all fops that take extra data like modes, uids, times, or keys. Change-Id: I02968611bc46beda108b4caf65cd6a8928679e16 Signed-off-by: Jeff Darcy --- .../changelog/src/policy/changelog-policy-replication.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'xlators/features/changelog/src') diff --git a/xlators/features/changelog/src/policy/changelog-policy-replication.c b/xlators/features/changelog/src/policy/changelog-policy-replication.c index 1f6a6140e..19492e2c6 100644 --- a/xlators/features/changelog/src/policy/changelog-policy-replication.c +++ b/xlators/features/changelog/src/policy/changelog-policy-replication.c @@ -500,8 +500,16 @@ changelog_replication_create (call_frame_t *frame, xlator_t *this, CHANGELOG_FILL_ENTRY (co, loc->pargfid, loc->name, entry_fn, entry_free_fn, xtra_len, out); + co++; - changelog_set_usable_record_and_length (local, xtra_len, 4); + /* + * This isn't really kosher (we should have a similar but separate + * mode_fn) but it should do for now. + */ + CHANGELOG_FILL_FOP_NUMBER (co, mode, fop_fn, xtra_len); + co++; + + changelog_set_usable_record_and_length (local, xtra_len, 5); frame->local = local; ret = 0; -- cgit