newnfs NFS client testing

Peter Jeremy peterjeremy at acm.org
Wed May 4 10:45:03 UTC 2011


On 2011-Apr-25 20:33:14 -0400, Rick Macklem <rmacklem at uoguelph.ca> 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 <nfs/nfsproto.h>) and the E*
macros in <sys/errno.h>: 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 <nfs/nfsproto.h> and <sys/errno.h> warning of this assumption
in case of future changes.

Note that both NFS servers do include code for error code mapping.

-- 
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20110504/f5972c92/attachment.pgp


More information about the freebsd-current mailing list