Whamcloud - gitweb
LU-16649 llite: EIO is possible on a race with page reclaim
authorPatrick Farrell <pfarrell@whamcloud.com>
Fri, 12 May 2023 14:22:58 +0000 (10:22 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 12 May 2023 23:57:32 +0000 (23:57 +0000)
commit3080587f22e82ffe957e08240fcd57475fb3201c
tree34703e3804f336cf62ddf3d74462a3dd30e53d05
parent5583476a933a5af3d2b94c1aed1c6470fbe03234
LU-16649 llite: EIO is possible on a race with page reclaim

We must clear the 'uptodate' page flag when we delete a
page from Lustre, or stale reads can occur.  However,
generic_file_buffered_read requires any pages returned from
readpage() be uptodate.

So, we must retry reading if page truncation happens in
parallel with the read.

This implements the same fix as:
https://review.whamcloud.com/49647
b4da788a819f82d35b685d6ee7f02809c05ca005

did for the mmap path.

Lustre-change: https://review.whamcloud.com/50344
Lustre-commit: 1d98e5c32b41e19bb1247958e666bb66e69dbc4c

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Iae0d1eb343f25a0176135347e54c309056c2613a
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/50346
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/obd_support.h
lustre/llite/file.c
lustre/llite/rw.c
lustre/llite/rw26.c
lustre/llite/vvp_io.c
lustre/tests/Makefile.am
lustre/tests/fadvise_dontneed_helper.c [new file with mode: 0644]
lustre/tests/sanityn.sh