Whamcloud - gitweb
LU-16025 llite: allow unaligned DIO reaching EOF 18/54718/10
authorBobi Jam <bobijam@whamcloud.com>
Wed, 10 Apr 2024 09:19:53 +0000 (17:19 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 5 Jun 2024 04:43:56 +0000 (04:43 +0000)
commita3a0cced416ce9721f5baa7c2da458ff07b33838
tree30744df2ab65072ea33af9a623c07eb9c9c0bd93
parentb6595baa7a1c623a0826ce81a2e05ca1b3009491
LU-16025 llite: allow unaligned DIO reaching EOF

Direct IO requires file offset and iov_iter count be page aligned, if
server does not support unaligned DIO.

For old servers, they do not have OBD_CONNECT2_UNALIGNED_DIO support,
and be deemed as not supporting unaligned DIO.

Since mirror resync would use direct IO to read data from a mirror,
and if the file size is not page aligned, the last read iov_iter
would be truncated by commit 4468f6c9d9 and would contain unaligned
iov_iter count, so it would fail with old servers.

This patch fixes this interop issue by allowing unaligned DIO
reaching the end of the file.

Test-Parameters: testlist=sanity-sec serverversion=EXA6
Fixes: 7194eb6431 ("LU-13805 clio: bounce buffer for unaligned DIO")
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I229e193c3f0df0c21284991809573e312d18a556
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54718
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Patrick Farrell <patrick.farrell@oracle.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/file.c
lustre/llite/rw26.c
lustre/utils/lfs.c
lustre/utils/liblustreapi_layout.c
lustre/utils/liblustreapi_mirror.c