diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2010-03-26 01:19:29 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2010-03-26 01:19:29 +0000 |
commit | dad418e560598ca2c34505006f7d2a90df57229b (patch) | |
tree | f6c42df41961a885cfe65451fa5ba6bee821d330 /sys | |
parent | 7de0bbaff58d86b017574aeb560004a0cb65a6a2 (diff) | |
download | FreeBSD-src-dad418e560598ca2c34505006f7d2a90df57229b.zip FreeBSD-src-dad418e560598ca2c34505006f7d2a90df57229b.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/nfsserver/nfs_srvsubs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/nfsserver/nfs_srvsubs.c b/sys/nfsserver/nfs_srvsubs.c index d84261e..f2e9d51 100644 --- a/sys/nfsserver/nfs_srvsubs.c +++ b/sys/nfsserver/nfs_srvsubs.c @@ -1128,6 +1128,9 @@ nfsrv_fhtovp(fhandle_t *fhp, int lockflag, struct vnode **vpp, int *vfslockedp, } } 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; |