summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-01-10 22:27:56 -0700
committerJens Axboe <axboe@kernel.dk>2019-01-10 22:29:27 -0700
commita7abc9fb769596d3bbf6d779e99d1cb8c1fcd49b (patch)
tree2a24c0b6de5e1b3d99203dfd9d3e7c77868ad82d /os
parent191561c108198d35c47a4848f0553f2a81b09efc (diff)
downloadfio-a7abc9fb769596d3bbf6d779e99d1cb8c1fcd49b.tar.gz
fio-a7abc9fb769596d3bbf6d779e99d1cb8c1fcd49b.tar.bz2
t/io_uring: add support for registered files
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'os')
-rw-r--r--os/io_uring.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/os/io_uring.h b/os/io_uring.h
index 613930db..e1d3df0b 100644
--- a/os/io_uring.h
+++ b/os/io_uring.h
@@ -16,7 +16,7 @@
*/
struct io_uring_sqe {
__u8 opcode; /* type of operation for this sqe */
- __u8 flags; /* as of now unused */
+ __u8 flags; /* IOSQE_ flags below */
__u16 ioprio; /* ioprio for the request */
__s32 fd; /* file descriptor to do IO on */
__u64 off; /* offset into file */
@@ -38,6 +38,7 @@ struct io_uring_sqe {
* sqe->flags
*/
#define IOSQE_FIXED_BUFFER (1 << 0) /* use fixed buffer */
+#define IOSQE_FIXED_FILE (1 << 1) /* use fixed fileset */
/*
* io_uring_setup() flags
@@ -121,10 +122,17 @@ struct io_uring_params {
*/
#define IORING_REGISTER_BUFFERS 0
#define IORING_UNREGISTER_BUFFERS 1
+#define IORING_REGISTER_FILES 2
+#define IORING_UNREGISTER_FILES 3
struct io_uring_register_buffers {
struct iovec *iovecs;
unsigned nr_iovecs;
};
+struct io_uring_register_files {
+ int *fds;
+ unsigned nr_fds;
+};
+
#endif