Whamcloud - gitweb
LU-16649 llite: EIO is possible on a race with page reclaim 00/50600/3
authorPatrick Farrell <pfarrell@whamcloud.com>
Tue, 9 May 2023 18:48:03 +0000 (14:48 -0400)
committerOleg Drokin <green@whamcloud.com>
Sat, 20 May 2023 07:11:51 +0000 (07:11 +0000)
commit63b4c244e8481b4113bb7bd1230bdbfeb6b34973
tree0c8add1771b687dd8710bf791d325098b6f2b265
parent72b5be5ccc1c58ae6edc968fa9106d53578aeccb
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/fs/lustre-release/+/50600
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@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