diff options
| author | Peter Wemm <peter@FreeBSD.org> | 1998-05-30 16:33:58 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 1998-05-30 16:33:58 +0000 |
| commit | 7c1c33a7dd16e123fb836b48b7318eca0026d75e (patch) | |
| tree | 4f808c23626fbcbe2da4ab45af795e14b7e43829 /sys/nfs/nfs_vfsops.c | |
| parent | 6edfc50c8e9d5097a2f5e82cc8a6d7b1de5f9bd3 (diff) | |
Notes
Diffstat (limited to 'sys/nfs/nfs_vfsops.c')
| -rw-r--r-- | sys/nfs/nfs_vfsops.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c index 729ccbac00b3..554b0ef9a9ba 100644 --- a/sys/nfs/nfs_vfsops.c +++ b/sys/nfs/nfs_vfsops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95 - * $Id: nfs_vfsops.c,v 1.62 1998/05/20 08:05:45 peter Exp $ + * $Id: nfs_vfsops.c,v 1.63 1998/05/24 14:41:56 peter Exp $ */ #include <sys/param.h> @@ -333,6 +333,7 @@ nfs_fsinfo(nmp, vp, cred, p) caddr_t bpos, dpos, cp2; int error = 0, retattr; struct mbuf *mreq, *mrep, *md, *mb, *mb2; + u_int64_t maxfsize; nfsstats.rpccnt[NFSPROC_FSINFO]++; nfsm_reqhead(vp, NFSPROC_FSINFO, NFSX_FH(1)); @@ -367,6 +368,11 @@ nfs_fsinfo(nmp, vp, cred, p) if (max < nmp->nm_readdirsize) { nmp->nm_readdirsize = max; } + /* XXX */ + nmp->nm_maxfilesize = (u_int64_t)0x80000000 * DEV_BSIZE - 1; + fxdr_hyper(&fsp->fs_maxfilesize, &maxfsize); + if (maxfsize > 0 && maxfsize < nmp->nm_maxfilesize) + nmp->nm_maxfilesize = maxfsize; nmp->nm_state |= NFSSTA_GOTFSINFO; } nfsm_reqdone; @@ -690,6 +696,13 @@ mountnfs(argp, mp, nam, pth, hst, vpp) * unsuspecting binaries). */ mp->mnt_maxsymlinklen = 1; + if ((argp->flags & NFSMNT_NFSV3) == 0) + /* + * V2 can only handle 32 bit filesizes. For v3, nfs_fsinfo + * will fill this in. + */ + nmp->nm_maxfilesize = 0xffffffffLL; + nmp->nm_timeo = NFS_TIMEO; nmp->nm_retry = NFS_RETRANS; nmp->nm_wsize = NFS_WSIZE; |
