aboutsummaryrefslogtreecommitdiffstats
path: root/io_uring/uring_cmd.c
diff options
context:
space:
mode:
authorCaleb Sander Mateos <csander@purestorage.com>2025-07-08 14:22:10 -0600
committerJens Axboe <axboe@kernel.dk>2025-07-18 12:34:56 -0600
commit733c43f1df34f9185b945e6f12ac00c8556c6dfe (patch)
tree11afa9a11d1a0cef38d61c08dde9247d9ddb3a8e /io_uring/uring_cmd.c
parentio_uring/zcrx: account area memory (diff)
downloadlinux-733c43f1df34f9185b945e6f12ac00c8556c6dfe.tar.gz
linux-733c43f1df34f9185b945e6f12ac00c8556c6dfe.zip
io_uring/cmd: introduce IORING_URING_CMD_REISSUE flag
Add a flag IORING_URING_CMD_REISSUE that ->uring_cmd() implementations can use to tell whether this is the first or subsequent issue of the uring_cmd. This will allow ->uring_cmd() implementations to store information in the io_uring_cmd's pdu across issues. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Acked-by: David Sterba <dsterba@suse.com> Link: https://lore.kernel.org/r/20250708202212.2851548-3-csander@purestorage.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/uring_cmd.c')
-rw-r--r--io_uring/uring_cmd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/io_uring/uring_cmd.c b/io_uring/uring_cmd.c
index b228b84a510f..58964a2f8582 100644
--- a/io_uring/uring_cmd.c
+++ b/io_uring/uring_cmd.c
@@ -261,7 +261,11 @@ int io_uring_cmd(struct io_kiocb *req, unsigned int issue_flags)
}
ret = file->f_op->uring_cmd(ioucmd, issue_flags);
- if (ret == -EAGAIN || ret == -EIOCBQUEUED)
+ if (ret == -EAGAIN) {
+ ioucmd->flags |= IORING_URING_CMD_REISSUE;
+ return ret;
+ }
+ if (ret == -EIOCBQUEUED)
return ret;
if (ret < 0)
req_set_fail(req);