aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/helpers.c
diff options
context:
space:
mode:
authorNeilBrown <[email protected]>2024-09-05 19:09:43 +0000
committerAnna Schumaker <[email protected]>2024-09-23 19:03:30 +0000
commitc63f0e48febfaea8a3cd4146abda9cc7a329b0e3 (patch)
tree721201b13bb9a9af58831326dcea304d4d66c784 /rust/helpers/helpers.c
parentnfsd: factor out __fh_verify to allow NULL rqstp to be passed (diff)
downloadkernel-c63f0e48febfaea8a3cd4146abda9cc7a329b0e3.tar.gz
kernel-c63f0e48febfaea8a3cd4146abda9cc7a329b0e3.zip
nfsd: add nfsd_file_acquire_local()
nfsd_file_acquire_local() can be used to look up a file by filehandle without having a struct svc_rqst. This can be used by NFS LOCALIO to allow the NFS client to bypass the NFS protocol to directly access a file provided by the NFS server which is running in the same kernel. In nfsd_file_do_acquire() care is taken to always use fh_verify() if rqstp is not NULL (as is the case for non-LOCALIO callers). Otherwise the non-LOCALIO callers will not supply the correct and required arguments to __fh_verify (e.g. gssclient isn't passed). Introduce fh_verify_local() wrapper around __fh_verify to make it clear that LOCALIO is intended caller. Also, use GC for nfsd_file returned by nfsd_file_acquire_local. GC offers performance improvements if/when a file is reopened before launderette cleans it from the filecache's LRU. Suggested-by: Jeff Layton <[email protected]> # use filecache's GC Signed-off-by: NeilBrown <[email protected]> Co-developed-by: Mike Snitzer <[email protected]> Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Chuck Lever <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions