Whamcloud - gitweb
EX-3663 pcc: auto attach should skip if already attached
authorQian Yingjin <qian@ddn.com>
Wed, 18 Aug 2021 02:03:23 +0000 (10:03 +0800)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 28 Aug 2021 01:26:36 +0000 (01:26 +0000)
commit75fd9e117c1b6505d992efaf112822214d107058
tree9d3a896bcdb4d5b1a8ccc5c48e9d71753fcfb959
parent2a600912ae17da551a7365dc0521a8df571b9e8f
EX-3663 pcc: auto attach should skip if already attached

When try to auto attach a file into PCC, if found that the file
had already attached into PCC, it should skip the auto attach
processing. Otherwise, it will result in wrong PCC inode refcount
when multiple threads try to auto attach a file at the same time.

For a file once mmapped into PCC and detached due to layout lock
shrinking or manual detach command, If found that file is still
valid cached (attach into PCC again by another thread), in the
@pcc_mmap_io_init(), it should set the mapping of PCC copy with
the one of Lustre file again.

Test-Parameters: testlist=sanity-pcc,sanity-pcc,sanity-pcc
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I5f049ca7d6db8708712e79e9ad459fc60b80f2be
Reviewed-on: https://review.whamcloud.com/44697
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/llite/pcc.c
lustre/tests/sanity-pcc.sh