Whamcloud - gitweb
LU-16637 llite: tolerate fresh page cache pages after truncate 54/53554/3
authorAndrew Perepechko <andrew.perepechko@hpe.com>
Tue, 26 Dec 2023 17:02:12 +0000 (20:02 +0300)
committerAndrew Perepechko <andrew.perepechko@hpe.com>
Tue, 2 Jan 2024 18:52:12 +0000 (18:52 +0000)
commitf4c8d44a7c2f0fbc2c74d1832ff63c5216c22c38
treefae5b01d3f0e92578337d377ee37c305fcf47301
parent955e38051765609fe3a661035c0fab2cfca733ce
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
lustre/include/obd_support.h
lustre/llite/llite_lib.c
lustre/llite/rw26.c
lustre/tests/sanity.sh
lustre/utils/lfs.c