Whamcloud - gitweb
LU-17482 llite: short read could mess up next read offset
authorBobi Jam <bobijam@whamcloud.com>
Fri, 26 Jan 2024 10:14:36 +0000 (18:14 +0800)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 2 Feb 2024 16:20:21 +0000 (16:20 +0000)
commitfbb319a60cc165c1ab14d50c81c35b5fd94f8dcb
treea268e79a1420497b2bcb6d65d26fd22e0d0a7559
parentd1509ff2ca29b2ac35a773ecb31523f92a1f06c6
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.

Lustre-change: https://review.whamcloud.com/53827
Lustre-commit: TBD (from 4bec3a277c83932cfb5ba26e31336e1f4666460a)

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/ex/lustre-release/+/53828
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/obd_support.h
lustre/llite/file.c
lustre/tests/multiop.c
lustre/tests/sanity.sh