summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-syncop.h
diff options
context:
space:
mode:
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 212e495d5..3e3980c44 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)