t/io_uring: add support for registered files
[fio.git] / os / io_uring.h
index 613930dbf3253ef744263599383211f91d30995f..e1d3df0bef60d63cdb579b6f97cd363438fc1e9f 100644 (file)
@@ -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