aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2022-05-11 11:17:45 +0530
committerJens Axboe <axboe@kernel.dk>2022-05-11 07:40:47 -0600
commitee692a21e9bf8354bd3ec816f1cf4bff8619ed77 (patch)
tree2477bacf0efd2834593319aafdbb2d97deab9922 /include/uapi
parentio_uring: support CQE32 for nop operation (diff)
downloadlinux-dev-ee692a21e9bf8354bd3ec816f1cf4bff8619ed77.tar.xz
linux-dev-ee692a21e9bf8354bd3ec816f1cf4bff8619ed77.zip
fs,io_uring: add infrastructure for uring-cmd
file_operations->uring_cmd is a file private handler. This is somewhat similar to ioctl but hopefully a lot more sane and useful as it can be used to enable many io_uring capabilities for the underlying operation. IORING_OP_URING_CMD is a file private kind of request. io_uring doesn't know what is in this command type, it's for the provider of ->uring_cmd() to deal with. Co-developed-by: Kanchan Joshi <joshi.k@samsung.com> Signed-off-by: Kanchan Joshi <joshi.k@samsung.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20220511054750.20432-2-joshi.k@samsung.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/io_uring.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
index ac2d90d669c3..23618be55dd2 100644
--- a/include/uapi/linux/io_uring.h
+++ b/include/uapi/linux/io_uring.h
@@ -22,6 +22,7 @@ struct io_uring_sqe {
union {
__u64 off; /* offset into file */
__u64 addr2;
+ __u32 cmd_op;
};
union {
__u64 addr; /* pointer to buffer or iovecs */
@@ -61,14 +62,17 @@ struct io_uring_sqe {
__s32 splice_fd_in;
__u32 file_index;
};
- __u64 addr3;
- __u64 __pad2[1];
-
- /*
- * If the ring is initialized with IORING_SETUP_SQE128, then this field
- * contains 64-bytes of padding, doubling the size of the SQE.
- */
- __u64 __big_sqe_pad[0];
+ union {
+ struct {
+ __u64 addr3;
+ __u64 __pad2[1];
+ };
+ /*
+ * If the ring is initialized with IORING_SETUP_SQE128, then
+ * this field is used for 80 bytes of arbitrary command data
+ */
+ __u8 cmd[0];
+ };
};
enum {
@@ -175,6 +179,7 @@ enum io_uring_op {
IORING_OP_FGETXATTR,
IORING_OP_GETXATTR,
IORING_OP_SOCKET,
+ IORING_OP_URING_CMD,
/* this goes last, obviously */
IORING_OP_LAST,