Whamcloud - gitweb
LU-18705 pcc: only reset file mapping for valid cached file 99/57999/3
authorQian Yingjin <qian@ddn.com>
Thu, 6 Feb 2025 12:41:59 +0000 (20:41 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 6 Mar 2025 08:06:25 +0000 (08:06 +0000)
commit194102b8319cf5d70f19f2b669f91e9b3f6ea49b
tree30fd8123bfe060806589202327cfa06713e62c54
parentba2efc4a35b552d9781978c3c231a1599f4fe903
LU-18705 pcc: only reset file mapping for valid cached file

It should only reset and revise file mapping for the valid cached
file (@cached == true) in pcc_file_mapping_reset().

Otherwise, it will cause sanity-pcc test_97 panic as follows:
(pcc.c:3077:pcc_vma_file_reset())
ASSERTION( vma->vm_file->f_mapping == inode->i_mapping ) failed:
panic+0x114/0x2f6
lbug_with_loc.cold+0x30/0x69 [libcfs]
pcc_mmap_io_init+0xafe/0xd60 [lustre]
pcc_fault+0x170/0x3d0 [lustre]
ll_fault+0x43/0x9a0 [lustre]
__do_fault+0x3c/0x170
do_fault+0x24b/0x640

Test-Parameters: testlist=sanity-pcc env=ONLY=97,ONLY_REPEAT=50
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I7e9cd0cba9d230160c90a32bef452139c23164b3
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57999
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/llite/pcc.c