public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH liburing] io-cancel: add check for -ECANCELED
@ 2021-10-19  9:23 Hao Xu
  2021-10-29 12:27 ` Hao Xu
  0 siblings, 1 reply; 4+ messages in thread
From: Hao Xu @ 2021-10-19  9:23 UTC (permalink / raw)
  To: Jens Axboe; +Cc: io-uring, Pavel Begunkov, Joseph Qi

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 <[email protected]>
---
 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->user_data == 2 && cqe->res != -EALREADY && cqe->res)) {
 				fprintf(stderr, "%i %i\n", (int)cqe->user_data, cqe->res);
 				exit(1);
-- 
2.24.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH liburing] io-cancel: add check for -ECANCELED
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Hao Xu @ 2021-10-29 12:27 UTC (permalink / raw)
  To: Jens Axboe; +Cc: io-uring, Pavel Begunkov, Joseph Qi

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 <[email protected]>
> ---
>   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->user_data == 2 && cqe->res != -EALREADY && cqe->res)) {
>   				fprintf(stderr, "%i %i\n", (int)cqe->user_data, cqe->res);
>   				exit(1);
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH liburing] io-cancel: add check for -ECANCELED
  2021-10-29 12:27 ` Hao Xu
@ 2021-10-29 13:57   ` Pavel Begunkov
  2021-10-29 15:40     ` Hao Xu
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Begunkov @ 2021-10-29 13:57 UTC (permalink / raw)
  To: Hao Xu, Jens Axboe; +Cc: io-uring, Joseph Qi

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 <[email protected]>
>> ---
>>   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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH liburing] io-cancel: add check for -ECANCELED
  2021-10-29 13:57   ` Pavel Begunkov
@ 2021-10-29 15:40     ` Hao Xu
  0 siblings, 0 replies; 4+ messages in thread
From: Hao Xu @ 2021-10-29 15:40 UTC (permalink / raw)
  To: Pavel Begunkov, Jens Axboe; +Cc: io-uring, Joseph Qi

在 2021/10/29 下午9:57, Pavel Begunkov 写道:
> 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 <[email protected]>
>>> ---
>>>   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.
Ah, I see. Thanks Pavel.
> 
>>>                   (cqe->user_data == 2 && cqe->res != -EALREADY && 
>>> cqe->res)) {
>>>                   fprintf(stderr, "%i %i\n", (int)cqe->user_data, 
>>> cqe->res);
>>>                   exit(1);
>>>
>>
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-29 15:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2021-10-29 15:40     ` Hao Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox