From 45acdcbbdc2de50c59a8c3e21884a02902e6571f Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Sun, 21 Aug 2011 16:58:15 +0530 Subject: 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 Reviewed-by: Raghavendra Bhat Reviewed-by: Vijay Bellur --- xlators/cluster/afr/src/afr-common.c | 7 +++++++ xlators/cluster/afr/src/afr-inode-write.c | 1 + 2 files changed, 8 insertions(+) (limited to 'xlators') diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 19c5a83d2..a67382806 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 32b2e9a92..5d10944b1 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: -- cgit