Whamcloud - gitweb
LU-16025 llite: adjust read count as file got truncated 96/47896/21
authorBobi Jam <bobijam@whamcloud.com>
Thu, 7 Jul 2022 07:38:54 +0000 (15:38 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 25 Oct 2022 17:21:40 +0000 (17:21 +0000)
commit4468f6c9d92448cb72c5a616ec74653e83ee8e10
treeebc362046e64436dbfb7ca37db1945a91a5f1b24
parent3ffcb5b700ebfd68dba4daca4192fdacaf7fd541
LU-16025 llite: adjust read count as file got truncated

File read will not notice the file size truncate by another node,
and continue to read 0 filled pages beyond the new file size.

This patch add a confinement in the read to prevent the issue and
add a test case verifying the fix.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ie51ba09201a1ca1464c3a3892d367590e978ee34
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/47896
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <farr0186@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
lustre/llite/file.c
lustre/llite/glimpse.c
lustre/lov/lov_cl_internal.h
lustre/lov/lov_object.c
lustre/tests/sanityn.sh