Whamcloud - gitweb
LU-16637 llite: tolerate fresh page cache pages after truncate
authorAndrew Perepechko <andrew.perepechko@hpe.com>
Tue, 26 Dec 2023 17:02:12 +0000 (20:02 +0300)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 18 Jan 2024 09:24:48 +0000 (09:24 +0000)
commit04cc61f74ca8dd76fe3765a075e6e70fc0129a48
tree545ff81ad868871e480d0907e10d4af17c0bae5e
parentfc1f15a9900414b302683941c764662d6f49f88c
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.

Lustre-change: https://review.whamcloud.com/53554
Lustre-commit: TBD (from f4c8d44a7c2f0fbc2c74d1832ff63c5216c22c38)

Change-Id: I8cadc022a3d1822a585f32e1a765e59ad0ff434d
Signed-off-by: Andrew Perepechko <andrew.perepechko@hpe.com>
HPE-bug-id: LUS-11937
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53611
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/obd_support.h
lustre/llite/llite_lib.c
lustre/llite/rw26.c
lustre/tests/sanity.sh
lustre/utils/lfs.c