Merge pull request #36 from normanmaurer/writev_workaround

Add workaround for current kernel bug related to WRITEV and IOSEQ_ASYNC
This commit is contained in:
Josef Grieb 2020-09-05 11:02:54 +02:00 committed by GitHub
commit 89a2513a38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -137,7 +137,10 @@ final class IOUringSubmissionQueue {
}
// TODO: Make it configurable if we should use this flag or not.
PlatformDependent.putByte(sqe + SQE_FLAGS_FIELD, (byte) Native.IOSQE_ASYNC);
PlatformDependent.putByte(sqe + SQE_FLAGS_FIELD,
// Workaround for a kernel bug:
// See https://lore.kernel.org/io-uring/6428c1ee0234105d18c5e3e88aa00c57@nickhill.org/T/#t
(byte) (op != Native.IORING_OP_WRITEV ? Native.IOSQE_ASYNC : 0));
// pad field array -> all fields should be zero
long offsetIndex = 0;