Update io_uring_prep_fallocate() to use 64-bit length/offset For 64-bit builds this was already the case, and for 32-bit builds with -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 enabled. You could argue that without setting those you cannot work with big files anyway, which is true, but it's somewhat inconvenient for non C style languages. Just make them 64-bit by default, we're already passing in 64-bits for the kernel side anyway in the SQE. Link: https://github.com/tokio-rs/io-uring/pull/127 Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/man/io_uring_prep_fallocate.3 b/man/io_uring_prep_fallocate.3 index 86e1d39..426e1d5 100644 --- a/man/io_uring_prep_fallocate.3 +++ b/man/io_uring_prep_fallocate.3
@@ -13,8 +13,8 @@ .BI "void io_uring_prep_fallocate(struct io_uring_sqe *" sqe "," .BI " int " fd "," .BI " int " mode "," -.BI " off_t " offset "," -.BI " off_t " len ");" +.BI " __u64 " offset "," +.BI " __u64 " len ");" .fi .SH DESCRIPTION .PP
diff --git a/src/include/liburing.h b/src/include/liburing.h index 5b05e36..af143d0 100644 --- a/src/include/liburing.h +++ b/src/include/liburing.h
@@ -671,7 +671,7 @@ } IOURINGINLINE void io_uring_prep_fallocate(struct io_uring_sqe *sqe, int fd, - int mode, off_t offset, off_t len) + int mode, __u64 offset, __u64 len) { io_uring_prep_rw(IORING_OP_FALLOCATE, sqe, fd, 0, (unsigned int) mode, (__u64) offset);