diff options
author | Anand Avati <avati@redhat.com> | 2012-06-26 21:06:39 -0700 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-07-04 00:17:47 -0700 |
commit | 5a3d849b8563067d35c1422e43e605bd9533f3c2 (patch) | |
tree | 3af92a855743679a9f693a5ea9c35df67ff9c5dd /xlators/cluster/afr/src/afr-common.c | |
parent | d90596a15c03434f14258d754e37b84e3ec57310 (diff) |
cluster/afr: post-op-delay support
post-op-delay introduces an artificial delay between the OP and
POST-OP-CHANGELOG phases of a write transaction to increase the
probability of changelog-piggyback and eager-locking to work
more efficiently.
Also enable eager-locking by default.
Change-Id: I865ca4b68512c44818719c7e388952f15d53e6c2
BUG: 836033
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.com/3621
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pranithk@gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-common.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 407e76c0e..6787dfc27 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -2400,6 +2400,7 @@ __afr_fd_ctx_set (xlator_t *this, fd_t *fd) goto out; } + pthread_mutex_init (&fd_ctx->delay_lock, NULL); INIT_LIST_HEAD (&fd_ctx->paused_calls); INIT_LIST_HEAD (&fd_ctx->entries); @@ -2654,6 +2655,8 @@ afr_cleanup_fd_ctx (xlator_t *this, fd_t *fd) if (fd_ctx->lock_acquired) GF_FREE (fd_ctx->lock_acquired); + pthread_mutex_destroy (&fd_ctx->delay_lock); + GF_FREE (fd_ctx); } |