vfs_io_uring: retry after a short read in vfs_io_uring_pread_completion()
authorStefan Metzmacher <metze@samba.org>
Fri, 8 May 2020 11:30:17 +0000 (13:30 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 12 May 2020 19:53:45 +0000 (19:53 +0000)
commit42e77c4cf245d8420641d216d1abefe81f7a3b79
treed4de12baaee99928a1a884388be9b722c744a0cd
parentc57a731c4ce395fd710f0b066cd6f1b72223ae07
vfs_io_uring: retry after a short read in vfs_io_uring_pread_completion()

We need to be prepared for short reads from the kernel depending on
the state of the page cache. Windows and Mac clients don't
expect short reads for files, so we need to retry ourself.

For the future we may be able to play with some io_uring flags
in order to avoid the retries in userspace, but for now we just fix
the data corruption bug...

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14361

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_io_uring.c