Date: Mon, 26 Nov 2007 13:36:44 +0100 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: Robert Watson <rwatson@FreeBSD.org> Cc: Timo Sirainen <tss@iki.fi>, freebsd-current@FreeBSD.org, Adam McDougall <mcdouga9@egr.msu.edu>, mohans@FreeBSD.org Subject: Re: link() not increasing link count on NFS server Message-ID: <86ir3p4203.fsf@ds4.des.no> In-Reply-To: <20071115135734.O82897@fledge.watson.org> (Robert Watson's message of "Thu\, 15 Nov 2007 14\:05\:34 %2B0000 \(GMT\)") References: <20071115074247.GQ37473@egr.msu.edu> <20071115123543.H82897@fledge.watson.org> <1195132320.6039.135.camel@hurina> <20071115135734.O82897@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Robert Watson <rwatson@FreeBSD.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86ir3p4203.fsf>
