Whamcloud - gitweb
LU-8585 llite: don't cache MDS_OPEN_LOCK for volatile files 41/36641/4
authorJames Simmons <jsimmons@infradead.org>
Wed, 6 Nov 2019 15:04:13 +0000 (10:04 -0500)
committerOleg Drokin <green@whamcloud.com>
Mon, 16 Dec 2019 05:58:45 +0000 (05:58 +0000)
commit6a3a842add0e941d901869db195ec0068e69cde3
treeb3ee1f7183da2602673a0bd04863fa332dbbe1d8
parentdcdf060342e7d69b64171840cf9475bf65d036ea
LU-8585 llite: don't cache MDS_OPEN_LOCK for volatile files

The kernels knfsd constantly opens and closes files for each
access which can result in a continuous stream of open+close RPCs
being send to the MDS. To avoid this Lustre created a special
flag, ll_nfs_dentry, which enables caching of the MDS_OPEN_LOCK
on the client. The fhandles API also uses the same exportfs layer
as NFS which indirectly ends up caching the MDS_OPEN_LOCK as well.
This is okay for normal files except for Lustre's special volatile
files that are used for HSM restore. It is expected on the last
close of a Lustre volatile file that it is no longer accessable.
To ensure this behavior is kept don't cache MDS_OPEN_LOCK for
volatile files.

Change-Id: Ia5d78baf17279c6f268bc0bf443b428d5cbea440
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/36641
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/file.c