summaryrefslogtreecommitdiffstats
path: root/sys/fs/nfsclient/nfs_clvfsops.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/nfsclient/nfs_clvfsops.c')
-rw-r--r--sys/fs/nfsclient/nfs_clvfsops.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/fs/nfsclient/nfs_clvfsops.c b/sys/fs/nfsclient/nfs_clvfsops.c
index d7245ee..d6db84f 100644
--- a/sys/fs/nfsclient/nfs_clvfsops.c
+++ b/sys/fs/nfsclient/nfs_clvfsops.c
@@ -102,7 +102,8 @@ static int mountnfs(struct nfs_args *, struct mount *,
struct sockaddr *, char *, u_char *, u_char *, u_char *,
struct vnode **, struct ucred *, struct thread *, 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;
@@ -1123,6 +1124,7 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
mtx_init(&nmp->nm_sockreq.nr_mtx, "nfssock", NULL, MTX_DEF);
mp->mnt_data = nmp;
nmp->nm_getinfo = nfs_getnlminfo;
+ nmp->nm_vinvalbuf = ncl_vinvalbuf;
}
vfs_getnewfsid(mp);
nmp->nm_mountp = mp;
@@ -1465,7 +1467,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);
@@ -1481,5 +1484,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