]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
fusefs: check the vnode cache when looking up files for the NFS server
authorasomers <asomers@FreeBSD.org>
Fri, 31 May 2019 21:22:58 +0000 (21:22 +0000)
committerasomers <asomers@FreeBSD.org>
Fri, 31 May 2019 21:22:58 +0000 (21:22 +0000)
commit7df6408747274dd012245c6bbb6576d9337facad
treeb94e9dcad96987e809ad5b749fe5059931b9a130
parente9a49d66eb93410aec3294551f1ccfd70e1d882d
fusefs: check the vnode cache when looking up files for the NFS server

FUSE allows entries to be cached for a limited amount of time.  fusefs's
vnop_lookup method already implements that using the timeout functionality
of cache_lookup/cache_enter_time.  However, lookups for the NFS server go
through a separate path: vfs_vget.  That path can't use the same timeout
functionality because cache_lookup/cache_enter_time only work on pathnames,
whereas vfs_vget works by inode number.

This commit adds entry timeout information to the fuse vnode structure, and
checks it during vfs_vget.  This allows the NFS server to take advantage of
cached entries.  It's also the same path that FUSE's asynchronous cache
invalidation operations will use.

Sponsored by: The FreeBSD Foundation
sys/fs/fuse/fuse_internal.c
sys/fs/fuse/fuse_internal.h
sys/fs/fuse/fuse_node.h
sys/fs/fuse/fuse_vfsops.c
sys/fs/fuse/fuse_vnops.c
tests/sys/fs/fusefs/nfs.cc