Whamcloud - gitweb
LU-16649 llite: EIO is possible on a race with page reclaim 44/50344/9
authorPatrick Farrell <pfarrell@whamcloud.com>
Mon, 20 Mar 2023 21:21:32 +0000 (17:21 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 9 May 2023 05:46:49 +0000 (05:46 +0000)
commit1d98e5c32b41e19bb1247958e666bb66e69dbc4c
tree0a706da0be020af048bda8c7b3669882b72e9f51
parente3cfb688ed7116a57b2c7f89a3e4f28291a0b69f
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.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Iae0d1eb343f25a0176135347e54c309056c2613a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50344
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.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