summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-syncop.h
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kparthas@redhat.com>2013-05-02 16:13:59 +0530
committerAnand Avati <avati@redhat.com>2013-05-02 18:16:33 -0700
commitb224d7ffb88c274ef0a65d4b5d30b2ce320c6200 (patch)
treee9f5fc376571bf59a0885b3e0ce50394790be51a /xlators/mgmt/glusterd/src/glusterd-syncop.h
parent6556b5cf4077dc45a4c59d2d9ee2f23f5d0a80b0 (diff)
glusterd: Syncop callbks should take big lock too
Change-Id: I5ae71ab98f9a336dc9bbf0e7b2ec50a6ed42b0f5 BUG: 948686 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4938 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-syncop.h')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-syncop.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.h b/xlators/mgmt/glusterd/src/glusterd-syncop.h
index 212e495d52d..3e3980c442f 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.h
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.h
@@ -18,16 +18,21 @@
#define GD_SYNCOP(rpc, stb, cbk, req, prog, procnum, xdrproc) do { \
int ret = 0; \
struct synctask *task = NULL; \
+ glusterd_conf_t *conf= THIS->private; \
gf_boolean_t cbk_lost = _gf_true; \
task = synctask_get (); \
stb->task = task; \
\
+ /*This is to ensure that the brick_op_cbk is able to \
+ * take the big lock*/ \
+ synclock_unlock (&conf->big_lock); \
ret = gd_syncop_submit_request (rpc, req, stb, \
prog, procnum, cbk, \
(xdrproc_t)xdrproc, \
&cbk_lost); \
if (!cbk_lost) \
synctask_yield (stb->task); \
+ synclock_lock (&conf->big_lock); \
} while (0)