io_uring: add struct io_cold_def->sqe_copy() method
authorJens Axboe <axboe@kernel.dk>
Thu, 5 Jun 2025 17:33:52 +0000 (11:33 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 10 Jun 2025 13:36:26 +0000 (07:36 -0600)
commit10384ada503582b60b9cefca177e83211c0d9905
treec22d487915ea07c02ec2926d6c0d63c177ca77e0
parent64ea6b2f0b2b34bca19a6a87b99dd7ed34cb8944
io_uring: add struct io_cold_def->sqe_copy() method

Will be called by the core of io_uring, if inline issue is not going
to be tried for a request. Opcodes can define this handler to defer
copying of SQE data that should remain stable.

Only called if IO_URING_F_INLINE is set. If it isn't set, then there's a
bug in the core handling of this, and -EFAULT will be returned instead
to terminate the request. This will trigger a WARN_ON_ONCE(). Don't
expect this to ever trigger, and down the line this can be removed.

Reviewed-by: Caleb Sander Mateos <csander@purestorage.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/io_uring_types.h
io_uring/io_uring.c
io_uring/opdef.h