[PATCH 1/5] fs: add file_operations->uring_cmd()

Jens Axboe
2021-01-27T21:27:04Z

This is a file private handler, similar to ioctls but hopefully a lot
more sane and useful.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
include/linux/fs.h | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index fd47deea7c17..b596039966da 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1816,6 +1816,11 @@ struct dir_context {
#define REMAP_FILE_ADVISORY (REMAP_FILE_CAN_SHORTEN)

struct iov_iter;
+struct io_uring_cmd;
+
+enum io_uring_cmd_flags {
+ IO_URING_F_NONBLOCK = 1,
+};

struct file_operations {
struct module *owner;
@@ -1857,6 +1862,8 @@ struct file_operations {
struct file *file_out, loff_t pos_out,
loff_t len, unsigned int remap_flags);
int (*fadvise)(struct file *, loff_t, loff_t, int);
+
+ int (*uring_cmd)(struct io_uring_cmd *, enum io_uring_cmd_flags);
} __randomize_layout;

struct inode_operations {
--
2.30.0