diff options
author | Venky Shankar <vshankar@redhat.com> | 2013-07-24 00:01:19 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2013-07-25 04:40:17 -0700 |
commit | 131d78dd36bac795d50fee3b04969b5ea9cb613c (patch) | |
tree | 174666b5ad1123d86cbce7ddcd7f00cb2262f6b5 /xlators/features/changelog/src/changelog-helpers.h | |
parent | 333872c8ad93cb9da682d27e89bc2a58cf86aba0 (diff) |
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 <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/5380
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/features/changelog/src/changelog-helpers.h')
-rw-r--r-- | xlators/features/changelog/src/changelog-helpers.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/xlators/features/changelog/src/changelog-helpers.h b/xlators/features/changelog/src/changelog-helpers.h index bbea245b95f..ad79636b0eb 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 { \ |