Whamcloud - gitweb
LU-10406 mdt: invalidate cache upon LDLM lock 94/31194/33
authorAlex Zhuravlev <alexey.zhuravlev@intel.com>
Wed, 7 Feb 2018 08:51:54 +0000 (11:51 +0300)
committerOleg Drokin <green@whamcloud.com>
Tue, 13 Nov 2018 06:14:11 +0000 (06:14 +0000)
commit7edc970036e118dd6fc63252054c1c9f594ce1e1
treeece73a25afd8f54b19be32ebf2c0861ca47d3307
parentb23c1255ec0a82515c35f4cccfe87cd21c1d9746
LU-10406 mdt: invalidate cache upon LDLM lock

given new components (like LFSCK) can access storage w/o LDLM
locking, it's possible to find cache stale. so MDT should
invalidate local cache explicitly once LDLM lock is granted.

also, OSP should invdalite any state requested before invalidation
request as LDLM lock and request can be handled in different
order on the target and source MDTs. for example, get_attr was
sent first, the target MDT serviced it first, but the reply got
delayed for a reason. in the meantime LDLM lock was requested,
granted and received by the source MDT before reply for get_attr.
IOW, we get a state with old (potentially stale) state and LDLM
lock granted.

Change-Id: I7b96465d98960617c96a45accfb30dbfbd0e1576
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: https://review.whamcloud.com/31194
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lfsck/lfsck_lib.c
lustre/mdt/mdt_handler.c
lustre/osp/osp_internal.h
lustre/osp/osp_md_object.c
lustre/osp/osp_object.c
lustre/tests/sanity-lfsck.sh