Re: [PATCHSET] Cleanup io_uring sqe handling

Jens Axboe
2019-12-24T04:04:51Z

On 12/20/19 10:47 AM, Jens Axboe wrote:
> This series contains some prep work, then two patches that once and for
> all cleanup the sqe handling. After this patchset, the prep and issue
> handling is fully split, so each opcode has a prep handler that is called
> in the same way, and an issue handler that doesn't call the prep handler.
>
> The sqe pointer is removed from io_kiocb, so there cannot be any
> accidental dereference after we've done prep. Prep is always done in the
> original context, so we can have no reuse issues either.
>
> I've rebased for-5.6/io_uring to have this series first, so this series
> applies on top of io_uring-5.5. Ideally we'd put this into 5.5, but...
>
> In any case, please take a look, I think this is a massive improvement
> in terms of verifying that we're doing the right thing.
>
> fs/io_uring.c | 690 ++++++++++++++++++++++++++------------------------
> 1 file changed, 355 insertions(+), 335 deletions(-)

I've done various testing and everything seems to work just fine, no
issues found.

I'm tempted to push this to 5.5-rc4. It's a bit big, but I do think the
end result is much cleaner and we'll be better of for it.

--
Jens Axboe