summaryrefslogtreecommitdiffstats
path: root/sbin/hastd
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2011-10-27 18:49:16 +0000
committerpjd <pjd@FreeBSD.org>2011-10-27 18:49:16 +0000
commitfcce680c4702938b8610be256c2bbcf02d3517ca (patch)
tree730af8a781edb83c639ce261eece107eede5eec9 /sbin/hastd
parentc2e715af70b7bfbdbf345b266294162f4f27be40 (diff)
downloadFreeBSD-src-fcce680c4702938b8610be256c2bbcf02d3517ca.zip
FreeBSD-src-fcce680c4702938b8610be256c2bbcf02d3517ca.tar.gz
Monor cleanups.
MFC after: 3 days
Diffstat (limited to 'sbin/hastd')
-rw-r--r--sbin/hastd/primary.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sbin/hastd/primary.c b/sbin/hastd/primary.c
index 4cdbf0f..b06afc6 100644
--- a/sbin/hastd/primary.c
+++ b/sbin/hastd/primary.c
@@ -1453,9 +1453,6 @@ remote_send_thread(void *arg)
/* Move failed request immediately to the done queue. */
goto done_queue;
}
- pjdlog_debug(2,
- "remote_send: (%p) Moving request to the recv queue.",
- hio);
/*
* Protect connection from disappearing.
*/
@@ -1470,6 +1467,9 @@ remote_send_thread(void *arg)
* in different order we can get reply before we move request
* to recv queue.
*/
+ pjdlog_debug(2,
+ "remote_send: (%p) Moving request to the recv queue.",
+ hio);
mtx_lock(&hio_recv_list_lock[ncomp]);
wakeup = TAILQ_EMPTY(&hio_recv_list[ncomp]);
TAILQ_INSERT_TAIL(&hio_recv_list[ncomp], hio, hio_next[ncomp]);
@@ -1489,7 +1489,8 @@ remote_send_thread(void *arg)
* it immediately to the done queue.
*/
mtx_lock(&hio_recv_list_lock[ncomp]);
- TAILQ_REMOVE(&hio_recv_list[ncomp], hio, hio_next[ncomp]);
+ TAILQ_REMOVE(&hio_recv_list[ncomp], hio,
+ hio_next[ncomp]);
mtx_unlock(&hio_recv_list_lock[ncomp]);
goto done_queue;
}
@@ -1599,16 +1600,16 @@ remote_recv_thread(void *arg)
nv_free(nv);
continue;
}
+ ggio = &hio->hio_ggio;
error = nv_get_int16(nv, "error");
if (error != 0) {
/* Request failed on remote side. */
hio->hio_errors[ncomp] = error;
- reqlog(LOG_WARNING, 0, &hio->hio_ggio,
+ reqlog(LOG_WARNING, 0, ggio,
"Remote request failed (%s): ", strerror(error));
nv_free(nv);
goto done_queue;
}
- ggio = &hio->hio_ggio;
switch (ggio->gctl_cmd) {
case BIO_READ:
rw_rlock(&hio_remote_lock[ncomp]);
OpenPOWER on IntegriCloud