• J
    io_uring: standardize the prep methods · 06b76d44
    Jens Axboe 提交于
    We currently have a mix of use cases. Most of the newer ones are pretty
    uniform, but we have some older ones that use different calling
    calling conventions. This is confusing.
    
    For the opcodes that currently rely on the req->io->sqe copy saving
    them from reuse, add a request type struct in the io_kiocb command
    union to store the data they need.
    
    Prepare for all opcodes having a standard prep method, so we can call
    it in a uniform fashion and outside of the opcode handler. This is in
    preparation for passing in the 'sqe' pointer, rather than storing it
    in the io_kiocb. Once we have uniform prep handlers, we can leave all
    the prep work to that part, and not even pass in the sqe to the opcode
    handler. This ensures that we don't reuse sqe data inadvertently.
    Signed-off-by: NJens Axboe <axboe@kernel.dk>
    06b76d44
io_uring.c 129.7 KB