Whamcloud - gitweb
LU-15244 llite: set ra_pages of backing_dev_info with 0 69/45969/2
authorQian Yingjin <qian@ddn.com>
Wed, 5 Jan 2022 00:11:36 +0000 (16:11 -0800)
committerOleg Drokin <green@whamcloud.com>
Sat, 5 Feb 2022 06:11:46 +0000 (06:11 +0000)
commit7111122431ff6ea7edcf073afd63a13293bc7a51
tree646deda5cc1480719faf49623bc78ec0815610a2
parenta81d4b984b1a4de7a309370ce3e6f461704a5f65
LU-15244 llite: set ra_pages of backing_dev_info with 0

The latest RHEL8.5 kernel sets initial @ra_pages of
backing_dev_info with VM_READAHEAD_PAGES:
struct backing_dev_info *bdi_alloc(int node_id)
{
...
bdi->ra_pages = VM_READAHEAD_PAGES;
bdi->io_pages = VM_READAHEAD_PAGES;
...
}

This will cause that @ra_pages of file readahead state is set
with @bdi->ra_pages, make the readahead is out of Lustre control
and trigger the readahead logic in Linux kernel wrongly. And it
results in the failure sanity 101j.

In this patch, we force to set @ra_pages of backing_dev_info with
0 after setup the backing device info. By this way, it disables
kernel readahead in the super block.

This patch also cleanups the unnecessary setting of @ra_pages in
llite "file.c" and "vvp_io.c".

Lustre-change: https://review.whamcloud.com/45712
Lustre-commit: 878561880d2aba038db95e199f82b186f22daa45

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: If6468109620269c1e76abe3a1cd73c3b40a417a8
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/45969
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/file.c
lustre/llite/llite_lib.c
lustre/llite/vvp_io.c