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
committerVijay Bellur <vbellur@redhat.com>2013-05-16 20:44:44 -0700
commit8505eadb3032132a1b936951687ac643731c29ec (patch)
treeb4a722fb663aa5a95d6e922f06424115edb3a961 /xlators/mgmt/glusterd/src/glusterd-syncop.h
parent8ee88f074fa1b29c77f6b0f6ef1e027e25bddb04 (diff)
glusterd: Refresh glusterd-syncop fixes from master
Following commits were cherry-picked from master, 044f8ce syncop: Remove task from synclock's waitq before 'wake' cb6aeed glusterd: Give up big lock before performing any RPC 46572fe Revert "glusterd: Fix spurious wakeups in glusterd syncops" 5021e04 synctask: implement barriers around yield, not the other way 4843937 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> Reviewed-on: http://review.gluster.org/5021 Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-syncop.h')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-syncop.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.h b/xlators/mgmt/glusterd/src/glusterd-syncop.h
index 212e495d5..9318862e5 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.h
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.h
@@ -18,23 +18,27 @@
#define GD_SYNCOP(rpc, stb, cbk, req, prog, procnum, xdrproc) do { \
int ret = 0; \
struct synctask *task = NULL; \
- gf_boolean_t cbk_lost = _gf_true; \
+ glusterd_conf_t *conf= THIS->private; \
+ \
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) \
+ (xdrproc_t)xdrproc); \
+ if (!ret) \
synctask_yield (stb->task); \
+ synclock_lock (&conf->big_lock); \
} while (0)
int gd_syncop_submit_request (struct rpc_clnt *rpc, void *req,
void *cookie, rpc_clnt_prog_t *prog,
int procnum, fop_cbk_fn_t cbkfn,
- xdrproc_t xdrproc, gf_boolean_t *cbk_lost);
+ xdrproc_t xdrproc);
int gd_syncop_mgmt_lock (struct rpc_clnt *rpc, struct syncargs *arg,