From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 07:59:25 2012 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 828901065672; Sun, 12 Feb 2012 07:59:25 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 709838FC14; Sun, 12 Feb 2012 07:59:25 +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 q1C7xPl3071843; Sun, 12 Feb 2012 07:59:25 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1C7xPhH071841; Sun, 12 Feb 2012 07:59:25 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201202120759.q1C7xPhH071841@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 12 Feb 2012 07:59:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231557 - stable/8/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: Sun, 12 Feb 2012 07:59:25 -0000 Author: trociny Date: Sun Feb 12 07:59:25 2012 New Revision: 231557 URL: http://svn.freebsd.org/changeset/base/231557 Log: MFC r231015, r231016: r231015: Fix the regression introduced in r226859: if the local component is out of date BIO_READ requests got lost instead of being sent to the remote component. Reviewed by: pjd r231016: If a local write request is from the synchronization thread, when it is synchronizing data that is out of date on the local component, we should not send G_GATE_CMD_DONE acknowledge to the kernel. This fixes the issue, observed in async mode, when on synchronization from the remote component the worker terminated with "G_GATE_CMD_DONE failed" error. Reported by: Artem Kajalainen Reviewed by: pjd Modified: stable/8/sbin/hastd/primary.c Directory Properties: stable/8/sbin/hastd/ (props changed) Modified: stable/8/sbin/hastd/primary.c ============================================================================== --- stable/8/sbin/hastd/primary.c Sun Feb 12 07:57:58 2012 (r231556) +++ stable/8/sbin/hastd/primary.c Sun Feb 12 07:59:25 2012 (r231557) @@ -1255,7 +1255,7 @@ ggate_recv_thread(void *arg) pjdlog_debug(2, "ggate_recv: (%p) Moving request to the send queues.", hio); refcount_init(&hio->hio_countdown, ncomps); - for (ii = ncomp; ii < ncomps; ii++) + for (ii = ncomp; ii < ncomp + ncomps; ii++) QUEUE_INSERT1(hio, send, ii); } /* NOTREACHED */ @@ -1326,7 +1326,8 @@ local_send_thread(void *arg) } else { hio->hio_errors[ncomp] = 0; if (hio->hio_replication == - HAST_REPLICATION_ASYNC) { + HAST_REPLICATION_ASYNC && + !ISSYNCREQ(hio)) { ggio->gctl_error = 0; write_complete(res, hio); }