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>