io_uring: hide caches sqes from drivers
There is now an io_uring private part of cmd async_data, move saved sqe into it. Drivers are accessing it via struct io_uring_cmd::cmd. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/ecbe078dd57acefdbc4366d083327086c0879378.1743357121.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>pull/1194/head
parent
487a0710f8
commit
296e169618
|
|
@ -21,7 +21,6 @@ struct io_uring_cmd {
|
||||||
|
|
||||||
struct io_uring_cmd_data {
|
struct io_uring_cmd_data {
|
||||||
void *op_data;
|
void *op_data;
|
||||||
struct io_uring_sqe sqes[2];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline const void *io_uring_sqe_cmd(const struct io_uring_sqe *sqe)
|
static inline const void *io_uring_sqe_cmd(const struct io_uring_sqe *sqe)
|
||||||
|
|
|
||||||
|
|
@ -205,8 +205,8 @@ static int io_uring_cmd_prep_setup(struct io_kiocb *req,
|
||||||
* that it doesn't read in per-op data, play it safe and ensure that
|
* that it doesn't read in per-op data, play it safe and ensure that
|
||||||
* any SQE data is stable beyond prep. This can later get relaxed.
|
* any SQE data is stable beyond prep. This can later get relaxed.
|
||||||
*/
|
*/
|
||||||
memcpy(ac->data.sqes, sqe, uring_sqe_size(req->ctx));
|
memcpy(ac->sqes, sqe, uring_sqe_size(req->ctx));
|
||||||
ioucmd->sqe = ac->data.sqes;
|
ioucmd->sqe = ac->sqes;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
struct io_async_cmd {
|
struct io_async_cmd {
|
||||||
struct io_uring_cmd_data data;
|
struct io_uring_cmd_data data;
|
||||||
struct iou_vec vec;
|
struct iou_vec vec;
|
||||||
|
struct io_uring_sqe sqes[2];
|
||||||
};
|
};
|
||||||
|
|
||||||
int io_uring_cmd(struct io_kiocb *req, unsigned int issue_flags);
|
int io_uring_cmd(struct io_kiocb *req, unsigned int issue_flags);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue