svn commit: r353154 - head/sys/fs/nfsclient

Mateusz Guzik mjg at FreeBSD.org
Sun Oct 6 22:17:30 UTC 2019


Author: mjg
Date: Sun Oct  6 22:17:29 2019
New Revision: 353154
URL: https://svnweb.freebsd.org/changeset/base/353154

Log:
  nfsclient: add root vnode caching
  
  See r353150.
  
  Sponsored by:   The FreeBSD Foundation
  Differential Revision:  https://reviews.freebsd.org/D21646

Modified:
  head/sys/fs/nfsclient/nfs_clvfsops.c

Modified: head/sys/fs/nfsclient/nfs_clvfsops.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clvfsops.c	Sun Oct  6 22:17:11 2019	(r353153)
+++ head/sys/fs/nfsclient/nfs_clvfsops.c	Sun Oct  6 22:17:29 2019	(r353154)
@@ -136,7 +136,8 @@ static struct vfsops nfs_vfsops = {
 	.vfs_init =		ncl_init,
 	.vfs_mount =		nfs_mount,
 	.vfs_cmount =		nfs_cmount,
-	.vfs_root =		nfs_root,
+	.vfs_root =		vfs_cache_root,
+	.vfs_cachedroot =	nfs_root,
 	.vfs_statfs =		nfs_statfs,
 	.vfs_sync =		nfs_sync,
 	.vfs_uninit =		ncl_uninit,
@@ -1626,6 +1627,7 @@ mountnfs(struct nfs_args *argp, struct mount *mp, stru
 		 * Lose the lock but keep the ref.
 		 */
 		NFSVOPUNLOCK(*vpp, 0);
+		vfs_cache_root_set(mp, *vpp);
 		return (0);
 	}
 	error = EIO;


More information about the svn-src-all mailing list