From 131d78dd36bac795d50fee3b04969b5ea9cb613c Mon Sep 17 00:00:00 2001 From: Venky Shankar Date: Wed, 24 Jul 2013 00:01:19 +0530 Subject: features/changelog: fixes when enabling changelog Other enhancements being: * ignore fops made by rebalance * ignore internally triggered fops BUG: 987734 Change-Id: I7dd164ae3c209fdb8ec43a27e67b8846f937c93b Signed-off-by: Venky Shankar Reviewed-on: http://review.gluster.org/5380 Reviewed-by: Amar Tumballi Tested-by: Gluster Build System --- xlators/features/changelog/src/changelog-helpers.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'xlators/features/changelog/src/changelog-helpers.h') diff --git a/xlators/features/changelog/src/changelog-helpers.h b/xlators/features/changelog/src/changelog-helpers.h index bbea245b9..ad79636b0 100644 --- a/xlators/features/changelog/src/changelog-helpers.h +++ b/xlators/features/changelog/src/changelog-helpers.h @@ -373,9 +373,18 @@ changelog_forget (xlator_t *this, inode_t *inode); #define CHANGELOG_INIT_NOCHECK(this, local, inode, gfid, xrec) \ local = changelog_local_init (this, inode, gfid, xrec, _gf_true) -#define CHANGELOG_NOT_ACTIVE_THEN_GOTO(priv, label) do { \ +#define CHANGELOG_NOT_ACTIVE_THEN_GOTO(frame, priv, label) do { \ if (!priv->active) \ goto label; \ + /* ignore rebalance process's activity. */ \ + if (frame->root->pid == GF_CLIENT_PID_DEFRAG) \ + goto label; \ + } while (0) + +/* ignore internal fops */ +#define CHANGELOG_IF_INTERNAL_FOP_THEN_GOTO(dict, label) do { \ + if (dict && dict_get (dict, GLUSTERFS_INTERNAL_FOP_KEY)) \ + goto label; \ } while (0) #define CHANGELOG_COND_GOTO(priv, cond, label) do { \ -- cgit