Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jul 2018 12:39:43 +0300
From:      Toomas Soome <tsoome@me.com>
To:        Andriy Gapon <avg@FreeBSD.org>
Cc:        Warner Losh <imp@freebsd.org>, src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r336532 - in head/stand: . common i386 i386/loader i386/zfsboot i386/zfsloader sparc64 sparc64/loader sparc64/zfsloader
Message-ID:  <84EE7B03-935E-4D79-933E-35A9F80A227A@me.com>
In-Reply-To: <54f1863c-8791-ea3e-3c4f-0f4e1107b2bd@FreeBSD.org>
References:  <201807200517.w6K5HchM017801@repo.freebsd.org> <54f1863c-8791-ea3e-3c4f-0f4e1107b2bd@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help


> On 20 Jul 2018, at 11:00, Andriy Gapon <avg@FreeBSD.org> wrote:
> 
> On 20/07/2018 08:17, Warner Losh wrote:
>> Provide a symbolic link from zfsloader
>>  to loader so people who have not upgraded their boot blocks are not
>>  affected
> 
> I am not sure that ZFS boot blocks can handle symbolic links...
> I seem to recall that not a long time ago they lacked that ability.
> 

I did implement it. Just need to be sure if its backported when needed.

https://svnweb.freebsd.org/base?view=revision&revision=r314112

rgds,
toomas
From owner-svn-src-all@freebsd.org  Fri Jul 20 12:03:17 2018
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30EBC1042CC0;
 Fri, 20 Jul 2018 12:03:17 +0000 (UTC)
 (envelope-from rmacklem@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id D538E799F0;
 Fri, 20 Jul 2018 12:03:16 +0000 (UTC)
 (envelope-from rmacklem@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B64CD7EEF;
 Fri, 20 Jul 2018 12:03:16 +0000 (UTC)
 (envelope-from rmacklem@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6KC3GRa029182;
 Fri, 20 Jul 2018 12:03:16 GMT (envelope-from rmacklem@FreeBSD.org)
Received: (from rmacklem@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6KC3GYX029180;
 Fri, 20 Jul 2018 12:03:16 GMT (envelope-from rmacklem@FreeBSD.org)
Message-Id: <201807201203.w6KC3GYX029180@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to
 rmacklem@FreeBSD.org using -f
From: Rick Macklem <rmacklem@FreeBSD.org>
Date: Fri, 20 Jul 2018 12:03:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r336542 - head/sys/rpc
X-SVN-Group: head
X-SVN-Commit-Author: rmacklem
X-SVN-Commit-Paths: head/sys/rpc
X-SVN-Commit-Revision: 336542
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.27
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>;
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Jul 2018 12:03:17 -0000

Author: rmacklem
Date: Fri Jul 20 12:03:16 2018
New Revision: 336542
URL: https://svnweb.freebsd.org/changeset/base/336542

Log:
  Set SO_SNDTIMEO in the client side krpc when CLSET_TIMEOUT is done.
  
  During testing of the pNFS client, it was observed that an RPC could get
  stuck in sosend() for a very long time if the network connection to a DS
  had failed. This is fixed by setting SO_SNDTIMEO on the TCP socket.
  This is only done when CLSET_TIMEOUT is done and this is not done by any
  use of the krpc currently in the source tree, so there should be no effect
  on extant uses.
  A future patch will use CLSET_TIMEOUT for TCP connections to DSs.
  
  Reviewed by:	kib
  MFC after:	2 weeks
  Differential Revision:	https://reviews.freebsd.org/D16293

Modified:
  head/sys/rpc/clnt_rc.c

Modified: head/sys/rpc/clnt_rc.c
==============================================================================
--- head/sys/rpc/clnt_rc.c	Fri Jul 20 07:16:28 2018	(r336541)
+++ head/sys/rpc/clnt_rc.c	Fri Jul 20 12:03:16 2018	(r336542)
@@ -174,10 +174,26 @@ clnt_reconnect_connect(CLIENT *cl)
 		newclient = clnt_dg_create(so,
 		    (struct sockaddr *) &rc->rc_addr, rc->rc_prog, rc->rc_vers,
 		    rc->rc_sendsz, rc->rc_recvsz);
-	else
+	else {
+		/*
+		 * I do not believe a timeout of less than 1sec would make
+		 * sense here since short delays can occur when a server is
+		 * temporarily overloaded.
+		 */
+		if (rc->rc_timeout.tv_sec > 0 && rc->rc_timeout.tv_usec >= 0) {
+			error = so_setsockopt(so, SOL_SOCKET, SO_SNDTIMEO,
+			    &rc->rc_timeout, sizeof(struct timeval));
+			if (error != 0) {
+				stat = rpc_createerr.cf_stat = RPC_CANTSEND;
+				rpc_createerr.cf_error.re_errno = error;
+				td->td_ucred = oldcred;
+				goto out;
+			}
+		}
 		newclient = clnt_vc_create(so,
 		    (struct sockaddr *) &rc->rc_addr, rc->rc_prog, rc->rc_vers,
 		    rc->rc_sendsz, rc->rc_recvsz, rc->rc_intr);
+	}
 	td->td_ucred = oldcred;
 
 	if (!newclient) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?84EE7B03-935E-4D79-933E-35A9F80A227A>