summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshishir gowda <sgowda@redhat.com>2013-11-13 17:04:29 +0530
committershishir gowda <sgowda@redhat.com>2013-11-15 15:34:14 +0530
commit6ac146597ad78ce5ca84ac532e2b0e21d261620e (patch)
tree76aff390bc2020d6496c41b6fd60c068190bf3fe
parentd96f4969b1e36dc4cc3de389c42f947a05511fdd (diff)
protocol/server: init the barrier queue
Change-Id: Ib39b244fd29d837a0640dba505eeff42e0a22f9a Signed-off-by: shishir gowda <sgowda@redhat.com>
-rw-r--r--xlators/protocol/server/src/server-helpers.c6
-rw-r--r--xlators/protocol/server/src/server.c4
2 files changed, 7 insertions, 3 deletions
diff --git a/xlators/protocol/server/src/server-helpers.c b/xlators/protocol/server/src/server-helpers.c
index ff23959..2df463a 100644
--- a/xlators/protocol/server/src/server-helpers.c
+++ b/xlators/protocol/server/src/server-helpers.c
@@ -956,9 +956,11 @@ gf_barrier_transmit (server_conf_t *conf, gf_barrier_payload_t *payload)
if (frame) {
state = CALL_STATE (frame);
frame->local = NULL;
- client = state->client;
+ if (state)
+ client = state->client;
}
-
+ /* currently lk fops are not barrier'ed. This is reflecting code in
+ * server_submit_reply */
if (client)
lk_heal = ((server_conf_t *) client->this->private)->lk_heal;
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
index bea3e21..589bd7b 100644
--- a/xlators/protocol/server/src/server.c
+++ b/xlators/protocol/server/src/server.c
@@ -200,7 +200,7 @@ server_submit_reply (call_frame_t *frame, rpcsvc_request_t *req, void *arg,
}
UNLOCK (&barrier->lock);
if (barriered == _gf_true)
- goto ret;
+ goto out;
}
/* Then, submit the message for transmission. */
ret = rpcsvc_submit_generic (req, &rsp, 1, payload, payloadcount,
@@ -243,6 +243,7 @@ ret:
if (new_iobref) {
iobref_unref (iobref);
}
+out:
return ret;
}
@@ -970,6 +971,7 @@ init (xlator_t *this)
}
LOCK_INIT (&barrier->lock);
+ INIT_LIST_HEAD (&barrier->queue);
barrier->on = _gf_false;
GF_OPTION_INIT ("barrier-queue-length", barrier->max_size,