Re: [PATCH 2/4] io_uring/cmd: introduce IORING_URING_CMD_REISSUE flag

From: Alan Huang
Date: Wed Jul 02 2025 - 03:00:36 EST


On Jul 2, 2025, at 14:44, Ammar Faizi <ammarfaizi2@xxxxxxxxxxx> wrote:
>
> On 7/2/25 1:27 PM, Daniel Vacek wrote:
>> On Tue, 1 Jul 2025 at 21:04, Jens Axboe <axboe@xxxxxxxxx> wrote:
>>> Probably fold that under the next statement?
>>>
>>> if (ret == -EAGAIN || ret == -EIOCBQUEUED) {
>>> if (ret == -EAGAIN) {
>>> ioucmd->flags |= IORING_URING_CMD_REISSUE;
>>> return ret;
>>> }
>>>
>>> ?
>> I'd argue the original looks simpler, cleaner.
>
> I propose doing it this way:
>
> if (ret == -EAGAIN) {
> ioucmd->flags |= IORING_URING_CMD_REISSUE;
> return ret;
> }
>
> if (ret == -EIOCBQUEUED)
> return ret;
>
> It's simpler because the -EAGAIN is only checked once :)


Agreed


>
> --
> Ammar Faizi
>