summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-syncop.h
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kparthas@redhat.com>2013-04-10 17:12:01 +0530
committerAnand Avati <avati@redhat.com>2013-04-12 00:22:28 -0700
commitefa154bb0a4cac34d5a9610ec25d38eebe495f22 (patch)
tree76885bffb8388769e0cce63ee186e69b812a66cf /xlators/mgmt/glusterd/src/glusterd-syncop.h
parent2fbae10cc026c3a0dab82fdb47497f42f5683934 (diff)
glusterd: Fixed spurious wakeups in glusterd syncops
glusterd syncops perform a barrier_wake whenever rpc_clnt_submit returned -1. This is based on the wrong assumption that the cbkfn wasn't called. This would result in one more wakeup than there ought to be. Change-Id: I591e67c267f0e26d1145bf8fb5feeb2c13a751a1 BUG: 948686 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4802 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-syncop.h')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-syncop.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.h b/xlators/mgmt/glusterd/src/glusterd-syncop.h
index 658ed4e2a28..212e495d52d 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.h
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.h
@@ -18,13 +18,15 @@
#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; \
task = synctask_get (); \
stb->task = task; \
\
ret = gd_syncop_submit_request (rpc, req, stb, \
prog, procnum, cbk, \
- (xdrproc_t)xdrproc); \
- if (!ret) \
+ (xdrproc_t)xdrproc, \
+ &cbk_lost); \
+ if (!cbk_lost) \
synctask_yield (stb->task); \
} while (0)
@@ -32,7 +34,7 @@
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);
+ xdrproc_t xdrproc, gf_boolean_t *cbk_lost);
int gd_syncop_mgmt_lock (struct rpc_clnt *rpc, struct syncargs *arg,