summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorRaghavendra G <rgowdapp@redhat.com>2017-01-20 16:09:13 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2017-02-02 12:36:43 -0500
commit16f51cd98c56bcc61209d7cbbc4061bbd3aa8e5b (patch)
tree9f890de9ace73d4bbef5659528f19e5c5e6a6278 /libglusterfs
parentdb713127b7d2920ce98999143a502b6f554e9cff (diff)
performance/write-behind: access stub only if available during
statedump >Change-Id: Ia5dd718458a5e32138012f81f014d13fc6b28be2 >BUG: 1415115 >Signed-off-by: Raghavendra G <rgowdapp@redhat.com> >Reviewed-on: https://review.gluster.org/16440 >Reviewed-by: N Balachandran <nbalacha@redhat.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> >Smoke: Gluster Build System <jenkins@build.gluster.org> Change-Id: Ia5dd718458a5e32138012f81f014d13fc6b28be2 BUG: 1418623 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> (cherry picked from commit 85d7f1d1ee24ac400d4aa223478727643532693a) Reviewed-on: https://review.gluster.org/16519 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/call-stub.c47
-rw-r--r--libglusterfs/src/call-stub.h2
2 files changed, 49 insertions, 0 deletions
diff --git a/libglusterfs/src/call-stub.c b/libglusterfs/src/call-stub.c
index 9ed2493e80b..c9c47b56c98 100644
--- a/libglusterfs/src/call-stub.c
+++ b/libglusterfs/src/call-stub.c
@@ -2538,3 +2538,50 @@ call_unwind_error (call_stub_t *stub, int op_ret, int op_errno)
return;
}
+
+
+void
+call_unwind_error_keep_stub (call_stub_t *stub, int op_ret, int op_errno)
+{
+ xlator_t *old_THIS = NULL;
+
+ list_del_init (&stub->list);
+
+ old_THIS = THIS;
+ THIS = stub->frame->this;
+ {
+ stub->args_cbk.op_ret = op_ret;
+ stub->args_cbk.op_errno = op_errno;
+ call_resume_unwind (stub);
+ }
+
+ THIS = old_THIS;
+
+ return;
+
+}
+
+void
+call_resume_keep_stub (call_stub_t *stub)
+{
+ xlator_t *old_THIS = NULL;
+
+ errno = EINVAL;
+ GF_VALIDATE_OR_GOTO ("call-stub", stub, out);
+
+ list_del_init (&stub->list);
+
+ old_THIS = THIS;
+ THIS = stub->frame->this;
+ {
+ if (stub->wind)
+ call_resume_wind (stub);
+ else
+ call_resume_unwind (stub);
+ }
+
+ THIS = old_THIS;
+
+out:
+ return;
+}
diff --git a/libglusterfs/src/call-stub.h b/libglusterfs/src/call-stub.h
index 5779ee36e58..300b5935767 100644
--- a/libglusterfs/src/call-stub.h
+++ b/libglusterfs/src/call-stub.h
@@ -763,8 +763,10 @@ fop_setactivelk_cbk_stub (call_frame_t *frame, fop_setactivelk_cbk_t fn,
int32_t op_ret, int32_t op_errno, dict_t *xdata);
void call_resume (call_stub_t *stub);
+void call_resume_keep_stub (call_stub_t *stub);
void call_stub_destroy (call_stub_t *stub);
void call_unwind_error (call_stub_t *stub, int op_ret, int op_errno);
+void call_unwind_error_keep_stub (call_stub_t *stub, int op_ret, int op_errno);
/*
* Sometimes we might want to call just this, perhaps repeatedly, without