summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfs_vfsops.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2011-08-09 15:29:58 +0000
committerjhb <jhb@FreeBSD.org>2011-08-09 15:29:58 +0000
commit0a3de76e745fd86954a92bbd415695796d7f40df (patch)
treeada269514b89af73bbc1130a4a75ee5c8dbb9cf5 /sys/nfsclient/nfs_vfsops.c
parent2fc8ad1901361a8c45cc8f83bf0eecd5da604add (diff)
downloadFreeBSD-src-0a3de76e745fd86954a92bbd415695796d7f40df.zip
FreeBSD-src-0a3de76e745fd86954a92bbd415695796d7f40df.tar.gz
Merge 220876, 220877, and 221537 from the new NFS client to the old:
Allow the NFS client to use a max file size larger than 1TB for v3 mounts. It now allows files up to OFF_MAX subject to whatever limit the server advertises. Reviewed by: rmacklem Approved by: re (kib) MFC after: 1 week
Diffstat (limited to 'sys/nfsclient/nfs_vfsops.c')
-rw-r--r--sys/nfsclient/nfs_vfsops.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c
index 8498ee4..6bcc9b5 100644
--- a/sys/nfsclient/nfs_vfsops.c
+++ b/sys/nfsclient/nfs_vfsops.c
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
#include <sys/bio.h>
#include <sys/buf.h>
#include <sys/jail.h>
+#include <sys/limits.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
@@ -1228,13 +1229,11 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
*
* For V3, nfs_fsinfo will adjust this as necessary. Assume maximum
* that we can handle until we find out otherwise.
- * XXX Our "safe" limit on the client is what we can store in our
- * buffer cache using signed(!) block numbers.
*/
if ((argp->flags & NFSMNT_NFSV3) == 0)
nmp->nm_maxfilesize = 0xffffffffLL;
else
- nmp->nm_maxfilesize = (u_int64_t)0x80000000 * DEV_BSIZE - 1;
+ nmp->nm_maxfilesize = OFF_MAX;
nmp->nm_timeo = NFS_TIMEO;
nmp->nm_retry = NFS_RETRANS;
OpenPOWER on IntegriCloud