diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2009-05-18 21:22:03 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2009-05-18 21:22:03 +0000 |
commit | 29fae940fcbc3e4fe1733778367d0ccc87440b27 (patch) | |
tree | 9277d562e5b046ed7113735d075d9ce0ed660a74 /sys/fs/nfsclient/nfs_clnode.c | |
parent | f5760f10df7caf283652fa3551951b95d84a2423 (diff) | |
download | FreeBSD-src-29fae940fcbc3e4fe1733778367d0ccc87440b27.zip FreeBSD-src-29fae940fcbc3e4fe1733778367d0ccc87440b27.tar.gz |
Change the experimental NFSv4 client so that it does not do
the NFSv4 Close operations until ncl_inactive(). This is
necessary so that the Open StateIDs are available for doing
I/O on mmap'd files after VOP_CLOSE(). I also changed some
indentation for the nfscl_getclose() function.
Approved by: kib (mentor)
Diffstat (limited to 'sys/fs/nfsclient/nfs_clnode.c')
-rw-r--r-- | sys/fs/nfsclient/nfs_clnode.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/fs/nfsclient/nfs_clnode.c b/sys/fs/nfsclient/nfs_clnode.c index 188b72b..5148357 100644 --- a/sys/fs/nfsclient/nfs_clnode.c +++ b/sys/fs/nfsclient/nfs_clnode.c @@ -190,6 +190,13 @@ ncl_inactive(struct vop_inactive_args *ap) np = VTONFS(ap->a_vp); if (prtactive && vrefcnt(ap->a_vp) != 0) vprint("ncl_inactive: pushing active", ap->a_vp); + + /* + * Since mmap()'d files to I/O after VOP_CLOSE(), the NFSv4 Close + * operations are delayed until now. + */ + (void) nfsrpc_close(ap->a_vp, 1, td); + if (ap->a_vp->v_type != VDIR) { sp = np->n_sillyrename; np->n_sillyrename = NULL; |