svn commit: r205661 - head/sys/nfsserver

Rick Macklem rmacklem at FreeBSD.org
Fri Mar 26 01:19:29 UTC 2010


Author: rmacklem
Date: Fri Mar 26 01:19:29 2010
New Revision: 205661
URL: http://svn.freebsd.org/changeset/base/205661

Log:
  Patch the regular NFS server so that it returns ESTALE to the client
  for all errors returned by VFS_FHTOVP(). This is required to ensure
  that EIO doesn't get returned to the client when ZFS is used as the
  server file system.
  
  Tested by:	korvus AT comcast.net
  Reviewed by:	jhb
  MFC after:	2 weeks

Modified:
  head/sys/nfsserver/nfs_srvsubs.c

Modified: head/sys/nfsserver/nfs_srvsubs.c
==============================================================================
--- head/sys/nfsserver/nfs_srvsubs.c	Fri Mar 26 00:53:13 2010	(r205660)
+++ head/sys/nfsserver/nfs_srvsubs.c	Fri Mar 26 01:19:29 2010	(r205661)
@@ -1128,6 +1128,9 @@ nfsrv_fhtovp(fhandle_t *fhp, int lockfla
 		}
 	}
 	error = VFS_FHTOVP(mp, &fhp->fh_fid, vpp);
+	if (error != 0)
+		/* Make sure the server replies ESTALE to the client. */
+		error = ESTALE;
 	vfs_unbusy(mp);
 	if (error)
 		goto out;


More information about the svn-src-head mailing list