Whamcloud - gitweb
EX-3808 pcc: reset file mapping for pcc copy
authorYang Sheng <ys@whamcloud.com>
Sat, 18 Sep 2021 05:34:19 +0000 (13:34 +0800)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 30 Sep 2021 14:09:45 +0000 (14:09 +0000)
commit851962832b12201ee0d4969e9a7c5d0ccdff70ff
tree998a774fc8488a269d67f7e9c7576b71e65aba8b
parent275ad8d1f41c8b3727087beb5e719565235b1ba5
EX-3808 pcc: reset file mapping for pcc copy

The inode mapping of PCC copy will be replaced since mmap().
Then we must check & reset it while io starting. Else system
will crash on:
CPU: 3 PID: 31556 Comm: dd Kdump: loaded Tainted: P
Call Trace:
[<c1424463>] ll_readpage+0x4f3/0x870 [lustre]
[<a4bbf400>] generic_file_aio_read+0x3f0/0x790
[<c0418dc3>] ext4_file_read+0x43/0x130 [ext4]
[<c14564a3>] pcc_file_read_iter+0x323/0x390 [lustre]
[<c13f9ee2>] ll_file_aio_read+0x1f2/0x510 [lustre]
[<a4bfa59c>] ? mmap_region+0x20c/0x670
[<c13fa300>] ll_file_read+0x100/0x1c0 [lustre]
[<a4c4a6df>] vfs_read+0x9f/0x170
[<a4c4b59f>] SyS_read+0x7f/0xf0
[<a518de21>] ? system_call_after_swapgs+0xae/0x146
[<a518dede>] system_call_fastpath+0x25/0x2a
[<a518de21>] ? system_call_after_swapgs+0xae/0x146

Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: I719e9fac7362fe76f0ece399dda693b9e965c5bc
Reviewed-on: https://review.whamcloud.com/45052
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Yingjin Qian <qian@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Andreas Dilger <adilger@whamcloud.com>
lustre/llite/pcc.c
lustre/tests/mmap_cat.c
lustre/tests/sanity-pcc.sh