A cleaner fix for PR#5102, clear nonsense flags at mount time rather than

in the core of nfs_bio.c at the 11th hour.

PR:		5102
This commit is contained in:
Peter Wemm 1998-05-20 08:02:24 +00:00
parent c578853467
commit dfae73fd2e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=36248
4 changed files with 12 additions and 8 deletions

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95
* $Id: nfs_bio.c,v 1.54 1998/03/28 16:05:05 steve Exp $
* $Id: nfs_bio.c,v 1.55 1998/05/19 07:11:22 peter Exp $
*/
@ -1150,8 +1150,6 @@ nfs_doio(bp, cr, p)
case VDIR:
nfsstats.readdir_bios++;
uiop->uio_offset = ((u_quad_t)bp->b_lblkno) * NFS_DIRBLKSIZ;
if (!(nmp->nm_flag & NFSMNT_NFSV3))
nmp->nm_flag &= ~NFSMNT_RDIRPLUS;
if (nmp->nm_flag & NFSMNT_RDIRPLUS) {
error = nfs_readdirplusrpc(vp, uiop, cr);
if (error == NFSERR_NOTSUPP)

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95
* $Id: nfs_vfsops.c,v 1.59 1998/05/19 07:11:25 peter Exp $
* $Id: nfs_vfsops.c,v 1.60 1998/05/20 07:59:21 peter Exp $
*/
#include <sys/param.h>
@ -712,6 +712,10 @@ mountnfs(argp, mp, nam, pth, hst, vpp)
if (argp->sotype == SOCK_STREAM)
nmp->nm_flags &= ~NFSMNT_NOCONN;
/* Also clear RDIRPLUS if not NFSv3, it crashes some servers */
if ((argp->flags & NFSMNT_NFSV3) == 0)
nmp->nm_flag &= ~NFSMNT_RDIRPLUS;
if ((argp->flags & NFSMNT_TIMEO) && argp->timeo > 0) {
nmp->nm_timeo = (argp->timeo * NFS_HZ + 5) / 10;
if (nmp->nm_timeo < NFS_MINTIMEO)

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95
* $Id: nfs_bio.c,v 1.54 1998/03/28 16:05:05 steve Exp $
* $Id: nfs_bio.c,v 1.55 1998/05/19 07:11:22 peter Exp $
*/
@ -1150,8 +1150,6 @@ nfs_doio(bp, cr, p)
case VDIR:
nfsstats.readdir_bios++;
uiop->uio_offset = ((u_quad_t)bp->b_lblkno) * NFS_DIRBLKSIZ;
if (!(nmp->nm_flag & NFSMNT_NFSV3))
nmp->nm_flag &= ~NFSMNT_RDIRPLUS;
if (nmp->nm_flag & NFSMNT_RDIRPLUS) {
error = nfs_readdirplusrpc(vp, uiop, cr);
if (error == NFSERR_NOTSUPP)

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95
* $Id: nfs_vfsops.c,v 1.59 1998/05/19 07:11:25 peter Exp $
* $Id: nfs_vfsops.c,v 1.60 1998/05/20 07:59:21 peter Exp $
*/
#include <sys/param.h>
@ -712,6 +712,10 @@ mountnfs(argp, mp, nam, pth, hst, vpp)
if (argp->sotype == SOCK_STREAM)
nmp->nm_flags &= ~NFSMNT_NOCONN;
/* Also clear RDIRPLUS if not NFSv3, it crashes some servers */
if ((argp->flags & NFSMNT_NFSV3) == 0)
nmp->nm_flag &= ~NFSMNT_RDIRPLUS;
if ((argp->flags & NFSMNT_TIMEO) && argp->timeo > 0) {
nmp->nm_timeo = (argp->timeo * NFS_HZ + 5) / 10;
if (nmp->nm_timeo < NFS_MINTIMEO)