Whamcloud - gitweb
LU-17482 llite: short read could mess up next read offset 27/53827/6
authorBobi Jam <bobijam@whamcloud.com>
Fri, 26 Jan 2024 10:06:50 +0000 (18:06 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 4 Mar 2024 19:57:46 +0000 (19:57 +0000)
commit35fb413683affe9d41f3521259c260de6caf81d9
treec18ae6b77edf544c7ed01fc41afab48e09fd1f94
parent9b05e872482e380155f6151e3a966b1ec0d08041
LU-17482 llite: short read could mess up next read offset

When read reaches EOF, it could read data from stale pagecache, but
we need to restore the iocb->ki_pos so that next read could continue
from the correct offset.

Fixes: 4468f6c9d9 ("LU-16025 llite: adjust read count as file got truncated")
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ib8b62c41bf65f8efec82dda53fcfbdb68ad08b38
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53827
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Patrick Farrell <patrick.farrell@oracle.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/include/obd_support.h
lustre/llite/file.c
lustre/tests/multiop.c
lustre/tests/sanity.sh