Whamcloud - gitweb
LU-16025 llite: adjust read count as file got truncated 89/50689/2
authorBobi Jam <bobijam@whamcloud.com>
Thu, 7 Jul 2022 07:38:54 +0000 (15:38 +0800)
committerOleg Drokin <green@whamcloud.com>
Sat, 20 May 2023 07:08:43 +0000 (07:08 +0000)
commit48d247fcc97533ae10b204dd059c908344ab1d06
tree89ad45b4c13b46f36516a11848671d506ae89a44
parentb74560d74a9f890838dbf2f0719e3d27c1e5eaf8
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-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <farr0186@gmail.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50689
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Zhenyu Xu <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@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