diff options
| author | Bruce Evans <bde@FreeBSD.org> | 2007-01-25 13:07:25 +0000 |
|---|---|---|
| committer | Bruce Evans <bde@FreeBSD.org> | 2007-01-25 13:07:25 +0000 |
| commit | e43982a80157e32edd0b3959552a343fdfd9ad77 (patch) | |
| tree | 772c0073d1de70b0ce8ca09f64842cc6f2a7c106 | |
| parent | 4ae90ca5340d1d65313016861a46c18712d2de8f (diff) | |
Notes
| -rw-r--r-- | sys/nfs4client/nfs4_vfs_subs.c | 18 | ||||
| -rw-r--r-- | sys/nfsclient/nfs.h | 1 | ||||
| -rw-r--r-- | sys/nfsclient/nfs_vfsops.c | 13 |
3 files changed, 7 insertions, 25 deletions
diff --git a/sys/nfs4client/nfs4_vfs_subs.c b/sys/nfs4client/nfs4_vfs_subs.c index ced9e23954f8..6d667afa9fa0 100644 --- a/sys/nfs4client/nfs4_vfs_subs.c +++ b/sys/nfs4client/nfs4_vfs_subs.c @@ -65,24 +65,6 @@ #include <nfsclient/nfsnode.h> -static int nfs_iosize(struct nfsmount *nmp); - -static int -nfs_iosize(struct nfsmount *nmp) -{ - int iosize; - - /* - * Calculate the size used for io buffers. Use the larger - * of the two sizes to minimise nfs requests but make sure - * that it is at least one VM page to avoid wasting buffer - * space. - */ - iosize = max(nmp->nm_rsize, nmp->nm_wsize); - if (iosize < PAGE_SIZE) iosize = PAGE_SIZE; - return iosize; -} - void nfs4_vfsop_fsinfo(struct nfsv4_fattr *fap, struct nfsmount *nmp) { diff --git a/sys/nfsclient/nfs.h b/sys/nfsclient/nfs.h index 573a0e24a15c..c7fd08538069 100644 --- a/sys/nfsclient/nfs.h +++ b/sys/nfsclient/nfs.h @@ -329,6 +329,7 @@ int nfs_connect(struct nfsmount *, struct nfsreq *); void nfs_disconnect(struct nfsmount *); void nfs_safedisconnect(struct nfsmount *); int nfs_getattrcache(struct vnode *, struct vattr *); +int nfs_iosize(struct nfsmount *nmp); int nfsm_strtmbuf(struct mbuf **, char **, const char *, long); int nfs_bioread(struct vnode *, struct uio *, int, struct ucred *); int nfsm_uiotombuf(struct uio *, struct mbuf **, int, caddr_t *); diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index 653c946743a6..e1055eab2eeb 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -105,8 +105,8 @@ static int nfs_tprintf_delay = NFS_TPRINTF_DELAY; SYSCTL_INT(_vfs_nfs, NFS_TPRINTF_DELAY, downdelayinterval, CTLFLAG_RW, &nfs_tprintf_delay, 0, ""); -static int nfs_iosize(struct nfsmount *nmp); -static void nfs_decode_args(struct mount *mp, struct nfsmount *nmp, struct nfs_args *argp); +static void nfs_decode_args(struct mount *mp, struct nfsmount *nmp, + struct nfs_args *argp); static int mountnfs(struct nfs_args *, struct mount *, struct sockaddr *, char *, struct vnode **, struct ucred *cred); @@ -174,7 +174,7 @@ static void nfs_convert_diskless(void); static void nfs_convert_oargs(struct nfs_args *args, struct onfs_args *oargs); -static int +int nfs_iosize(struct nfsmount *nmp) { int iosize; @@ -185,10 +185,9 @@ nfs_iosize(struct nfsmount *nmp) * that it is at least one VM page to avoid wasting buffer * space. */ - iosize = max(nmp->nm_rsize, nmp->nm_wsize); - if (iosize < PAGE_SIZE) - iosize = PAGE_SIZE; - return iosize; + iosize = imax(nmp->nm_rsize, nmp->nm_wsize); + iosize = imax(iosize, PAGE_SIZE); + return (iosize); } static void |
