summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfs_vfsops.c
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2011-01-03 20:37:31 +0000
committerrmacklem <rmacklem@FreeBSD.org>2011-01-03 20:37:31 +0000
commit53f27d6094f8d165bcafb24f7a049f6b3cf2a986 (patch)
tree9aed4c3870731f851dbebcf0e78c72a3ef040397 /sys/nfsclient/nfs_vfsops.c
parent75e493953d739c141bef8a454eef4aedb9bf11d9 (diff)
downloadFreeBSD-src-53f27d6094f8d165bcafb24f7a049f6b3cf2a986.zip
FreeBSD-src-53f27d6094f8d165bcafb24f7a049f6b3cf2a986.tar.gz
Fix the nlm so that it no longer depends on the regular
nfs client and, as such, can be loaded for the experimental nfs client without the regular client. Reviewed by: jhb MFC after: 2 weeks
Diffstat (limited to 'sys/nfsclient/nfs_vfsops.c')
-rw-r--r--sys/nfsclient/nfs_vfsops.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c
index 52f5bfc..fc54ff6 100644
--- a/sys/nfsclient/nfs_vfsops.c
+++ b/sys/nfsclient/nfs_vfsops.c
@@ -116,7 +116,8 @@ static int mountnfs(struct nfs_args *, struct mount *,
struct sockaddr *, char *, struct vnode **,
struct ucred *cred, int);
static void nfs_getnlminfo(struct vnode *, uint8_t *, size_t *,
- struct sockaddr_storage *, int *, off_t *);
+ struct sockaddr_storage *, int *, off_t *,
+ struct timeval *);
static vfs_mount_t nfs_mount;
static vfs_cmount_t nfs_cmount;
static vfs_unmount_t nfs_unmount;
@@ -1205,6 +1206,7 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
TAILQ_INIT(&nmp->nm_bufq);
mp->mnt_data = nmp;
nmp->nm_getinfo = nfs_getnlminfo;
+ nmp->nm_vinvalbuf = nfs_vinvalbuf;
}
vfs_getnewfsid(mp);
nmp->nm_mountp = mp;
@@ -1499,7 +1501,8 @@ nfs_sysctl(struct mount *mp, fsctlop_t op, struct sysctl_req *req)
*/
static void
nfs_getnlminfo(struct vnode *vp, uint8_t *fhp, size_t *fhlenp,
- struct sockaddr_storage *sp, int *is_v3p, off_t *sizep)
+ struct sockaddr_storage *sp, int *is_v3p, off_t *sizep,
+ struct timeval *timeop)
{
struct nfsmount *nmp;
struct nfsnode *np = VTONFS(vp);
@@ -1515,5 +1518,9 @@ nfs_getnlminfo(struct vnode *vp, uint8_t *fhp, size_t *fhlenp,
*is_v3p = NFS_ISV3(vp);
if (sizep != NULL)
*sizep = np->n_size;
+ if (timeop != NULL) {
+ timeop->tv_sec = nmp->nm_timeo / NFS_HZ;
+ timeop->tv_usec = (nmp->nm_timeo % NFS_HZ) * (1000000 / NFS_HZ);
+ }
}
OpenPOWER on IntegriCloud