Re: [PATCH v2] io_uring/rw: cleanup io_rw_done()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 10, 2024 at 11:38:02AM -0700, Jens Axboe wrote:
> This originally came from the aio side, and it's laid out rather oddly.
> The common case here is that we either get -EIOCBQUEUED from submitting
> an async request, or that we complete the request correctly with the
> given number of bytes. Handling the odd internal restart error codes
> is not a common operation.
> 
> Lay it out a bit more optimally that better explains the normal flow,
> and switch to avoiding the indirect call completely as this is our
> kiocb and we know the completion handler can only be one of two
> possible variants. While at it, move it to where it belongs in the
> file, with fellow end IO helpers.
> 
> Outside of being easier to read, this also reduces the text size of the
> function by 24 bytes for me on arm64.
> 
> Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>

Looks good!

Reviewed-by: Keith Busch <kbusch@xxxxxxxxxx>




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux