From owner-freebsd-current@FreeBSD.ORG Wed May 4 21:06:04 2011 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 83B1B106564A for ; Wed, 4 May 2011 21:06:04 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 3DFC48FC15 for ; Wed, 4 May 2011 21:06:03 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAG++wU2DaFvO/2dsb2JhbACEUKJFiHKtBpEwgSqDXIEBBI81jlY X-IronPort-AV: E=Sophos;i="4.64,316,1301889600"; d="scan'208";a="119634539" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 04 May 2011 17:06:03 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 39FFFB3F24; Wed, 4 May 2011 17:06:03 -0400 (EDT) Date: Wed, 4 May 2011 17:06:03 -0400 (EDT) From: Rick Macklem To: Peter Jeremy Message-ID: <341885942.1025101.1304543163223.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <20110504082202.GA64659@server.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.202] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE7 (Win)/6.0.10_GA_2692) Cc: freebsd-current@freebsd.org Subject: Re: newnfs NFS client testing 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: Wed, 04 May 2011 21:06:04 -0000 > On 2011-Apr-25 20:33:14 -0400, Rick Macklem > wrote: > >I believe that the new/experimental NFS client in head is now > >compatible with the old/regular NFS client. > > Possibly even too compatible... > > Both the old and new NFS clients assume a 1:1 mapping between NFS > error codes (NFSERR_* macros defined in ) and the E* > macros in : In the old client, the NFS status is copied > from the RPC response by nfsclient/nfs_krpc.c:nfs_request(), returned > and passed back up the call chain. In the new client, the status is > copied from the RPC response into struct nfsrv_descript.nd_repstat > by fs/nfs/nfs_commonkrpc.c:newnfs_request() and then moved into an > error return in fs/nfsclient/nfs_clrpcops.c:nfsrpc_*(). > > This is not currently a problem but it would seem useful to include > notes in and warning of this assumption > in case of future changes. > > Note that both NFS servers do include code for error code mapping. > I guess that a comment might be in order. I know that the NFS ones will never change, since they're wired into the RFCs. I doubt anyone has an urge to renumber errno.h (the ones up to about 70), but a comment w.r.t. that in nfsproto.h could be useful. Thanks for the good suggestion, rick