summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-open.c
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2011-08-22 11:59:11 +0530
committerVijay Bellur <vijay@gluster.com>2011-08-22 02:30:15 -0700
commitb249ff7505392ae5cac1421a6a44310800d26feb (patch)
tree282061197825dce9b0312a1fce0947c32a95319a /xlators/cluster/afr/src/afr-open.c
parentb6e3e9c480be4226925b51c5e9ee0c368aa94a6d (diff)
cluster/afr: Paused fop should not continue with fop
Change-Id: Idce22a6266c354e327d5d717715d2e62533eec58 BUG: 3448 Reviewed-on: http://review.gluster.com/292 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-open.c')
-rw-r--r--xlators/cluster/afr/src/afr-open.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-open.c b/xlators/cluster/afr/src/afr-open.c
index ee037e5df..ae5851860 100644
--- a/xlators/cluster/afr/src/afr-open.c
+++ b/xlators/cluster/afr/src/afr-open.c
@@ -263,6 +263,7 @@ afr_openfd_fix_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int call_count = 0;
int child_index = (long) cookie;
struct list_head paused_calls = {0};
+ gf_boolean_t fop_paused = _gf_false;
priv = this->private;
local = frame->local;
@@ -277,6 +278,7 @@ afr_openfd_fix_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
goto out;
}
+ fop_paused = local->fop_paused;
LOCK (&local->fd->lock);
{
if (op_ret >= 0) {
@@ -297,12 +299,17 @@ afr_openfd_fix_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
out:
if (call_count == 0) {
afr_resume_calls (this, &paused_calls);
+ //If the fop is paused then resume_calls will continue the fop
+ if (fop_paused)
+ goto done;
+
if (local->fop_call_continue)
local->fop_call_continue (frame, this);
else
AFR_STACK_DESTROY (frame);
}
+done:
return 0;
}