public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: Hao Xu <[email protected]>, Jens Axboe <[email protected]>
Cc: [email protected], Joseph Qi <[email protected]>
Subject: Re: [PATCH 2/2] io_uring: better to use REQ_F_IO_DRAIN for req->flags
Date: Thu, 25 Nov 2021 14:26:07 +0000	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 11/25/21 09:21, Hao Xu wrote:
> It's better to use REQ_F_IO_DRAIN for req->flags rather than
> IOSQE_IO_DRAIN though they have same value.
> 
> Signed-off-by: Hao Xu <[email protected]>
> ---
>   fs/io_uring.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/io_uring.c b/fs/io_uring.c
> index ae9534382b26..08b1b3de9b3f 100644
> --- a/fs/io_uring.c
> +++ b/fs/io_uring.c
> @@ -7095,10 +7095,10 @@ static void io_init_req_drain(struct io_kiocb *req)
>   		 * If we need to drain a request in the middle of a link, drain
>   		 * the head request and the next request/link after the current
>   		 * link. Considering sequential execution of links,
> -		 * IOSQE_IO_DRAIN will be maintained for every request of our
> +		 * REQ_F_IO_DRAIN will be maintained for every request of our

Don't care much, but it's more about the userspace visible behaviour, and so
talks about IOSQE_IO_DRAIN.

Looks good,

>   		 * link.
>   		 */
> -		head->flags |= IOSQE_IO_DRAIN | REQ_F_FORCE_ASYNC;
> +		head->flags |= REQ_F_IO_DRAIN | REQ_F_FORCE_ASYNC;
>   		ctx->drain_next = true;
>   	}
>   }
> @@ -7149,7 +7149,7 @@ static int io_init_req(struct io_ring_ctx *ctx, struct io_kiocb *req,
>   		if (unlikely(ctx->drain_next) && !ctx->submit_state.link.head) {
>   			ctx->drain_next = false;
>   			ctx->drain_active = true;
> -			req->flags |= IOSQE_IO_DRAIN | REQ_F_FORCE_ASYNC;
> +			req->flags |= REQ_F_IO_DRAIN | REQ_F_FORCE_ASYNC;
>   		}
>   	}
>   
> 

-- 
Pavel Begunkov

  reply	other threads:[~2021-11-25 14:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-25  9:21 [PATCH for-5.17 0/2] small fix and code clean Hao Xu
2021-11-25  9:21 ` [PATCH 1/2] io_uring: fix no lock protection for ctx->cq_extra Hao Xu
2021-11-25 14:30   ` Pavel Begunkov
2021-11-26  3:29     ` Hao Xu
2021-11-25  9:21 ` [PATCH 2/2] io_uring: better to use REQ_F_IO_DRAIN for req->flags Hao Xu
2021-11-25 14:26   ` Pavel Begunkov [this message]
2021-11-25 16:00 ` [PATCH for-5.17 0/2] small fix and code clean Jens Axboe

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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox