Whamcloud - gitweb
LU-16637 llite: tolerate fresh page cache pages after truncate 54/53554/4
authorAndrew Perepechko <andrew.perepechko@hpe.com>
Tue, 26 Dec 2023 17:02:12 +0000 (20:02 +0300)
committerOleg Drokin <green@whamcloud.com>
Tue, 23 Jan 2024 05:31:50 +0000 (05:31 +0000)
commit7bb1e211d217d5a82ac2d5e4edad5ae018090761
tree19e3ef613c6f1a13d16b90321f8503b0e10ddb74
parent0ea23e019454e03810d532758afa52aa054995d8
LU-16637 llite: tolerate fresh page cache pages after truncate

Truncate called by ll_layout_refesh() can race with a fast read
or tiny write, which can add an uninitialized non-uptodate page
into the page cache.

We want to avoid expensive locking for this rare case so if there
is any leftover in the cache after truncate, just check that
the pages are not uptodate, not dirty and do not have any
filesystem-specific information attached to them.

Change-Id: I8cadc022a3d1822a585f32e1a765e59ad0ff434d
Signed-off-by: Andrew Perepechko <andrew.perepechko@hpe.com>
HPE-bug-id: LUS-11937
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53554
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Zhenyu Xu <bobijam@hotmail.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/obd_support.h
lustre/llite/llite_lib.c
lustre/llite/rw26.c
lustre/tests/sanity.sh
lustre/utils/lfs.c