summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2025-01-03 16:02:24 +0100
committerDavid Sterba <dsterba@suse.com>2025-01-06 13:51:06 +0100
commit3347fa658a1baecd61b007787d031b729cd86537 (patch)
tree97623883f4550fb4c6caa92fba2817000f1f18fd /include
parentio_uring/cmd: rename struct uring_cache to io_uring_cmd_data (diff)
downloadlinux-3347fa658a1baecd61b007787d031b729cd86537.tar.xz
linux-3347fa658a1baecd61b007787d031b729cd86537.zip
io_uring/cmd: add per-op data to struct io_uring_cmd_data
In case an op handler for ->uring_cmd() needs stable storage for user data, it can allocate io_uring_cmd_data->op_data and use it for the duration of the request. When the request gets cleaned up, uring_cmd will free it automatically. Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/io_uring/cmd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/io_uring/cmd.h b/include/linux/io_uring/cmd.h
index 24cff2b9b9d4..3df6636ec3a3 100644
--- a/include/linux/io_uring/cmd.h
+++ b/include/linux/io_uring/cmd.h
@@ -20,6 +20,7 @@ struct io_uring_cmd {
struct io_uring_cmd_data {
struct io_uring_sqe sqes[2];
+ void *op_data;
};
static inline const void *io_uring_sqe_cmd(const struct io_uring_sqe *sqe)