summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2011-08-21 16:58:15 +0530
committerVijay Bellur <vijay@gluster.com>2011-08-21 04:42:43 -0700
commit45acdcbbdc2de50c59a8c3e21884a02902e6571f (patch)
tree4b0f1d8ce9390085142638c33116243ee0fd30f6
parentaa07e855859d6a175fccb309ec3158e6ca894b0c (diff)
cluster/afr: fop should not continue if it is paused, until resumes
Change-Id: Ie026ebed98cf5ff75ae1a13437d29f67d0e0254a BUG: 3448 Reviewed-on: http://review.gluster.com/286 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r--xlators/cluster/afr/src/afr-common.c7
-rw-r--r--xlators/cluster/afr/src/afr-inode-write.c1
2 files changed, 8 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index 19c5a83d2da..a6738280695 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -2251,6 +2251,8 @@ afr_cleanup_fd_ctx (xlator_t *this, fd_t *fd)
uint64_t ctx = 0;
afr_fd_ctx_t *fd_ctx = NULL;
int ret = 0;
+ afr_fd_paused_call_t *paused_call = NULL;
+ afr_fd_paused_call_t *tmp = NULL;
ret = fd_ctx_get (fd, this, &ctx);
if (ret < 0)
@@ -2270,6 +2272,11 @@ afr_cleanup_fd_ctx (xlator_t *this, fd_t *fd)
if (fd_ctx->pre_op_piggyback)
GF_FREE (fd_ctx->pre_op_piggyback);
+ list_for_each_entry_safe (paused_call, tmp, &fd_ctx->paused_calls,
+ call_list) {
+ list_del_init (&paused_call->call_list);
+ GF_FREE (paused_call);
+ }
GF_FREE (fd_ctx);
}
diff --git a/xlators/cluster/afr/src/afr-inode-write.c b/xlators/cluster/afr/src/afr-inode-write.c
index 32b2e9a923e..5d10944b1fd 100644
--- a/xlators/cluster/afr/src/afr-inode-write.c
+++ b/xlators/cluster/afr/src/afr-inode-write.c
@@ -407,6 +407,7 @@ afr_open_fd_fix (call_frame_t *frame, xlator_t *this, gf_boolean_t pause_fop)
ret = afr_pause_fd_fop (frame, this, fd_ctx);
if (ret)
goto unlock;
+ fop_continue = _gf_false;
}
}
unlock: