Whamcloud - gitweb
LU-16463 llite: replace lld_nfs_dentry flag with opencache handling 37/49237/11
authorJames Simmons <jsimmons@infradead.org>
Tue, 7 Feb 2023 15:08:13 +0000 (10:08 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 23 Feb 2023 06:27:46 +0000 (06:27 +0000)
commitd7a85652f4fcb83192262cfc1a0211890f404c7c
tree3e368fec40e0c3300aa33b7d20e47927948828a2
parent73b5d7db7e8d3ede42524fc447fb30fa05ea7a3f
LU-16463 llite: replace lld_nfs_dentry flag with opencache handling

The lld_nfs_dentry flag was created for the case of caching the
open lock (opencache) when fetching fhandles for NFSv3. This same
path is used by the fhandle APIs. This lighter open changes key
behaviors since the open lock is always cached which we don't
want. Lustre introduced a way to modify caching the open lock
based on the number of opens done on a file within a certain
span of time. We can replace lld_nfs_dentry flag with the
new open lock caching. This way for fhandle handling we match
the open lock caching behavior of a normal file open.

In the case of NFS this code path will always be called with the
internal kernel thread 'nfsd'. If we are called by this kernel
thread set the open threshold to zero which means always cache the
open lock. Once Lustre is only supported on Linux kernels above
5.5 we can remove this special NFSv3 work around.

Change-Id: Iba27f7ad4579fdd1f34e1e35c2cbd547e15f129a
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49237
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Etienne AUJAMES <eaujames@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/file.c
lustre/llite/llite_internal.h
lustre/llite/llite_nfs.c
lustre/llite/namei.c
lustre/llite/super25.c