summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/nfs/nfs.h2
-rw-r--r--sys/fs/nfsclient/nfs_clvfsops.c2
-rw-r--r--sys/fs/nfsserver/nfs_nfsdport.c17
3 files changed, 18 insertions, 3 deletions
diff --git a/sys/fs/nfs/nfs.h b/sys/fs/nfs/nfs.h
index 0bf0f74..c8bb0d6 100644
--- a/sys/fs/nfs/nfs.h
+++ b/sys/fs/nfs/nfs.h
@@ -39,7 +39,7 @@
*/
#define NFS_MAXIOVEC 34
-#define NFS_TICKINTVL 10 /* Desired time for a tick (msec) */
+#define NFS_TICKINTVL 500 /* Desired time for a tick (msec) */
#define NFS_HZ (hz / nfscl_ticks) /* Ticks/sec */
#define NFS_TIMEO (1 * NFS_HZ) /* Default timeout = 1 second */
#define NFS_MINTIMEO (1 * NFS_HZ) /* Min timeout to use */
diff --git a/sys/fs/nfsclient/nfs_clvfsops.c b/sys/fs/nfsclient/nfs_clvfsops.c
index 8b4fc6a..b11160b 100644
--- a/sys/fs/nfsclient/nfs_clvfsops.c
+++ b/sys/fs/nfsclient/nfs_clvfsops.c
@@ -1224,7 +1224,7 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
if ((argp->flags & (NFSMNT_NFSV3 | NFSMNT_NFSV4)) == 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;
diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c
index 90e7d4f..9ea077d 100644
--- a/sys/fs/nfsserver/nfs_nfsdport.c
+++ b/sys/fs/nfsserver/nfs_nfsdport.c
@@ -1280,8 +1280,23 @@ nfsvno_fsync(struct vnode *vp, u_int64_t off, int cnt, struct ucred *cred,
int
nfsvno_statfs(struct vnode *vp, struct statfs *sf)
{
+ int error;
- return (VFS_STATFS(vp->v_mount, sf));
+ error = VFS_STATFS(vp->v_mount, sf);
+ if (error == 0) {
+ /*
+ * Since NFS handles these values as unsigned on the
+ * wire, there is no way to represent negative values,
+ * so set them to 0. Without this, they will appear
+ * to be very large positive values for clients like
+ * Solaris10.
+ */
+ if (sf->f_bavail < 0)
+ sf->f_bavail = 0;
+ if (sf->f_ffree < 0)
+ sf->f_ffree = 0;
+ }
+ return (error);
}
/*
OpenPOWER on IntegriCloud