From owner-freebsd-current@FreeBSD.ORG Mon Nov 26 12:36:54 2007 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A99CF16A46E; Mon, 26 Nov 2007 12:36:54 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 5D36713C4CC; Mon, 26 Nov 2007 12:36:54 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id AC1A12090; Mon, 26 Nov 2007 13:36:44 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.1/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 6028D208F; Mon, 26 Nov 2007 13:36:44 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id 39C2984485; Mon, 26 Nov 2007 13:36:44 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Robert Watson References: <20071115074247.GQ37473@egr.msu.edu> <20071115123543.H82897@fledge.watson.org> <1195132320.6039.135.camel@hurina> <20071115135734.O82897@fledge.watson.org> Date: Mon, 26 Nov 2007 13:36:44 +0100 In-Reply-To: <20071115135734.O82897@fledge.watson.org> (Robert Watson's message of "Thu\, 15 Nov 2007 14\:05\:34 +0000 \(GMT\)") Message-ID: <86ir3p4203.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Timo Sirainen , freebsd-current@FreeBSD.org, Adam McDougall , mohans@FreeBSD.org Subject: Re: link() not increasing link count on NFS server X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2007 12:36:54 -0000 Robert Watson writes: > Indeed, and inspection of nfs_vnops.c:nfs_link(): finds: > > 1772 /* > 1773 * Kludge: Map EEXIST =3D> 0 assuming that it is a reply to = a retry. > 1774 */ > 1775 if (error =3D=3D EEXIST) > 1776 error =3D 0; > 1777 return (error); > > Neither Linux nor Solaris appears to have this logic in the client. I > assume this is, as suggested, to work around UDP retransmissions where > the reply is lost rather than the request. It appears to exist in > revision 1.1 of nfs_vnops.c, so came in with 4.4BSD in the initial > import, but doesn't appear in NetBSD so I'm guessing they've removed > it. Wrong, it still exists in NetBSD, but they've separated part of nfs_link() (including that bit) out into nfs_linkrpc(). They also seem to have added logic to detect a retransmit: /* * Kludge: Map EEXIST =3D> 0 assuming that it is a reply to a retry. */ if (rexmit && error =3D=3D EEXIST) error =3D 0; revision 1.197 date: 2004/05/10 10:40:42; author: yamt; state: Exp; lines: +32 -25 don't do kludge for a reply to a retransmitted request unless we actually retransmitted the request. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no