Whamcloud - gitweb
LU-14177 pcc: clear PCC-RO cache from old client access 50/40850/2
authorQian Yingjin <qian@ddn.com>
Thu, 3 Dec 2020 09:08:38 +0000 (17:08 +0800)
committerQian Yingjin <qian@ddn.com>
Mon, 7 Dec 2020 03:51:25 +0000 (11:51 +0800)
commit0c76ae7f3cb6fc3a9f70d1398f773d8afffa50f1
treed03064c8a6bc13b61949513dfc3cd73c1e3c4146
parentf414e86a31c498bac619da62a21e81a735983bed
LU-14177 pcc: clear PCC-RO cache from old client access

For the purpose of the compatibility and interoperability, we have
added a PCC-RO connection flags.

To avoid inconsistent data access, MDT does not (try to) grant
layout lock to the client at the time of getattr() and open().
When an old client without PCC-RO support requests a layout lock
via a intent lock request on the file in LCM_FL_PCC_RDONLY state,
MDT needs to clear the LCM_FL_PCC_RDONLY flag on the layout first
which will invalidate all PCC-RO caches on the clients, and then
return the layout to the old client.

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I69707d1ac53decaddd32bcf231b15d3565fb200f
lustre/include/lustre_export.h
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/llite/llite_lib.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_open.c