From owner-svn-src-all@FreeBSD.ORG Thu Oct 27 18:49:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FEB81065676; Thu, 27 Oct 2011 18:49:16 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4FBDC8FC08; Thu, 27 Oct 2011 18:49:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9RInG4e020086; Thu, 27 Oct 2011 18:49:16 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RInGwA020084; Thu, 27 Oct 2011 18:49:16 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110271849.p9RInGwA020084@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 27 Oct 2011 18:49:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226852 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2011 18:49:16 -0000 Author: pjd Date: Thu Oct 27 18:49:16 2011 New Revision: 226852 URL: http://svn.freebsd.org/changeset/base/226852 Log: Monor cleanups. MFC after: 3 days Modified: head/sbin/hastd/primary.c Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Thu Oct 27 18:45:01 2011 (r226851) +++ head/sbin/hastd/primary.c Thu Oct 27 18:49:16 2011 (r226852) @@ -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]);