Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Feb 2012 07:57:58 +0000 (UTC)
From:      Mikolaj Golub <trociny@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r231556 - stable/9/sbin/hastd
Message-ID:  <201202120757.q1C7vwwL071761@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trociny
Date: Sun Feb 12 07:57:58 2012
New Revision: 231556
URL: http://svn.freebsd.org/changeset/base/231556

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 <artem kayalaynen ru>
  Reviewed by:	pjd

Modified:
  stable/9/sbin/hastd/primary.c
Directory Properties:
  stable/9/sbin/hastd/   (props changed)

Modified: stable/9/sbin/hastd/primary.c
==============================================================================
--- stable/9/sbin/hastd/primary.c	Sun Feb 12 07:56:46 2012	(r231555)
+++ stable/9/sbin/hastd/primary.c	Sun Feb 12 07:57:58 2012	(r231556)
@@ -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);
 				}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202120757.q1C7vwwL071761>