A filesystem may not support VFS_VGET (like msdosfs). If it doesn't,

the server code would always skip all dir entries for a readdirplus
operation. To avoid endlessly retrying clients, try VFS_VGET first,
and it it fails, return NFSERR_NOTSUPP so that client will fall
back to normal readdir operations.
This commit is contained in:
fvdl 1997-07-15 01:07:47 +00:00
parent e9118660e4
commit c437b55ca7
1 changed files with 17 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: nfs_serv.c,v 1.35 1997/06/24 23:32:45 fvdl Exp $ */
/* $NetBSD: nfs_serv.c,v 1.36 1997/07/15 01:07:47 fvdl Exp $ */
/*
* Copyright (c) 1989, 1993
@ -2827,6 +2827,22 @@ again:
#else
VOP_UNLOCK(vp);
#endif
/*
* If the VGET operation doesn't work for this filesystem,
* we can't support readdirplus. Returning NOTSUPP should
* make clients fall back to plain readdir.
* There's no need to check for VPTOFH as well, we wouldn't
* even be here otherwise.
*/
if (!getret) {
if ((getret = VFS_VGET(vp->v_mount, at.va_fileid, &nvp)))
getret = (getret == EOPNOTSUPP) ?
NFSERR_NOTSUPP : NFSERR_IO;
else
vput(nvp);
}
if (!cookies && !error)
error = NFSERR_PERM;
if (!error)