diff options
author | Jeff Darcy <jdarcy@redhat.com> | 2014-02-05 19:01:23 +0000 |
---|---|---|
committer | Jeff Darcy <jdarcy@redhat.com> | 2014-02-11 13:59:54 +0000 |
commit | 33939dcde38389373e7ed8b12c6e9916b39411d0 (patch) | |
tree | 86d6e0207f2cf3419bb7ab0820a5cfed39683360 /xlators/features/changelog/src | |
parent | 6f9bec28ea3a488111cda974ee6959bd86094f31 (diff) |
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 <jdarcy@redhat.com>
Diffstat (limited to 'xlators/features/changelog/src')
-rw-r--r-- | xlators/features/changelog/src/policy/changelog-policy-replication.c | 10 |
1 files changed, 9 insertions, 1 deletions
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; |