Whamcloud - gitweb
LU-16025 llite: adjust read count as file got truncated
authorBobi Jam <bobijam@whamcloud.com>
Thu, 7 Jul 2022 07:38:54 +0000 (15:38 +0800)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 27 Oct 2022 03:23:39 +0000 (03:23 +0000)
commitb3c762c3c57f94323503a36661266a5dd4beaca8
treed6640fafefb09012a47c0e116a99002d90541812
parente6dd728a915be7ae96777d15a865c62a80ffc8d9
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.

Lustre-change: https://review.whamcloud.com/47896
Lustre-commit: 4468f6c9d92448cb72c5a616ec74653e83ee8e10

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ie51ba09201a1ca1464c3a3892d367590e978ee34
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/48848
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/llite/file.c
lustre/llite/glimpse.c
lustre/lov/lov_cl_internal.h
lustre/lov/lov_object.c
lustre/tests/sanityn.sh