All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Hao Xu <haoxu@linux.alibaba.com>, Jens Axboe <axboe@kernel.dk>
Cc: io-uring@vger.kernel.org, Joseph Qi <joseph.qi@linux.alibaba.com>
Subject: Re: [PATCH liburing] io-cancel: add check for -ECANCELED
Date: Fri, 29 Oct 2021 14:57:16 +0100	[thread overview]
Message-ID: <172d0e03-4560-a686-82cd-f6cd6d12da6c@gmail.com> (raw)
In-Reply-To: <ed9793a5-92e8-f5d9-3a33-d263bf5e760e@linux.alibaba.com>

On 10/29/21 13:27, Hao Xu wrote:
> ping this one since test/io-cancel will be broken
> if the async hybrid logic merges to 5.16
> 在 2021/10/19 下午5:23, Hao Xu 写道:
>> The req to be async cancelled will most likely return -ECANCELED after
>> cancellation with the new async bybrid optimization applied. And -EINTR
>> is impossible to be returned anymore since we won't be in INTERRUPTABLE
>> sleep when reading, so remove it.
>>
>> Signed-off-by: Hao Xu <haoxu@linux.alibaba.com>
>> ---
>>   test/io-cancel.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/test/io-cancel.c b/test/io-cancel.c
>> index b5b443dc467b..c761e126be0c 100644
>> --- a/test/io-cancel.c
>> +++ b/test/io-cancel.c
>> @@ -341,7 +341,7 @@ static int test_cancel_req_across_fork(void)
>>                   fprintf(stderr, "wait_cqe=%d\n", ret);
>>                   return 1;
>>               }
>> -            if ((cqe->user_data == 1 && cqe->res != -EINTR) ||
>> +            if ((cqe->user_data == 1 && cqe->res != -ECANCELED) ||

cqe->res != -ECANCELED && cqe->res != -EINTR?

First backward compatibility, and in case internals or the test
changes.

>>                   (cqe->user_data == 2 && cqe->res != -EALREADY && cqe->res)) {
>>                   fprintf(stderr, "%i %i\n", (int)cqe->user_data, cqe->res);
>>                   exit(1);
>>
> 

-- 
Pavel Begunkov

  reply	other threads:[~2021-10-29 13:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19  9:23 [PATCH liburing] io-cancel: add check for -ECANCELED Hao Xu
2021-10-29 12:27 ` Hao Xu
2021-10-29 13:57   ` Pavel Begunkov [this message]
2021-10-29 15:40     ` Hao Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=172d0e03-4560-a686-82cd-f6cd6d12da6c@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=haoxu@linux.alibaba.com \
    --cc=io-uring@vger.kernel.org \
    --cc=joseph.qi@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.