public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>
Cc: Carlos Maiolino <cem@kernel.org>,
	Bart Van Assche <bvanassche@acm.org>,
	linux-block@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/4] block: factor out a bio_await helper
Date: Mon, 6 Apr 2026 09:05:32 +0200	[thread overview]
Message-ID: <8814db8e-1494-4ea3-ae93-8dd3d714db3d@kernel.org> (raw)
In-Reply-To: <20260406055728.472919-3-hch@lst.de>

On 2026/04/06 7:57, Christoph Hellwig wrote:
> Add a new helper to wait for a bio and anything chained off it to
> complete synchronous after kicking it.  This factors common code out

s/synchronous after kicking it/synchronously after submitting it

(kicking is a little confusing as it could mean "rejecting")

> of submit_bio_wait and bio_await_chain and will also be useful for
> file system code and thus is exported.
> 
> Note that this will now set REQ_SYNC also for the bio_await case for
> consistency.  Nothing should look at the flag in the end_io handler,
> but if did, having the flag set makes more sense.

s/if did/if something does ?

> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  block/bio.c         | 53 +++++++++++++++++++++++++++++++--------------
>  include/linux/bio.h |  2 ++
>  2 files changed, 39 insertions(+), 16 deletions(-)
> 
> diff --git a/block/bio.c b/block/bio.c
> index 434e41182c05..c7e75d532666 100644
> --- a/block/bio.c
> +++ b/block/bio.c
> @@ -1468,17 +1468,20 @@ static void bio_wait_end_io(struct bio *bio)
>  }
>  
>  /**
> - * submit_bio_wait - submit a bio, and wait until it completes
> - * @bio: The &struct bio which describes the I/O
> + * bio_await - call a function on a bio, and wait until it completes
> + * @bio:	the bio which describes the I/O
> + * @kick:	function called to "kick off" the bio

To be consistent with my comment above, I think a better (clearer) name her
would be simply "submit".

Other than these nits, looks all good to me. So feel free to add:

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>


-- 
Damien Le Moal
Western Digital Research

  reply	other threads:[~2026-04-06  7:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-06  5:57 refactor submit_bio_wait and bio await helpers v2 Christoph Hellwig
2026-04-06  5:57 ` [PATCH 1/4] block: unify the synchronous bi_end_io callbacks Christoph Hellwig
2026-04-06  6:59   ` Damien Le Moal
2026-04-06  5:57 ` [PATCH 2/4] block: factor out a bio_await helper Christoph Hellwig
2026-04-06  7:05   ` Damien Le Moal [this message]
2026-04-06  5:57 ` [PATCH 3/4] block: add a bio_submit_or_kill helper Christoph Hellwig
2026-04-06  7:08   ` Damien Le Moal
2026-04-07 13:59     ` Christoph Hellwig
2026-04-06  5:57 ` [PATCH 4/4] xfs: use bio_await in xfs_zone_gc_reset_sync Christoph Hellwig
2026-04-06  7:09   ` Damien Le Moal
  -- strict thread matches above, loose matches on Subject: below --
2026-04-01 14:03 refactor submit_bio_wait and bio await helpers Christoph Hellwig
2026-04-01 14:03 ` [PATCH 2/4] block: factor out a bio_await helper Christoph Hellwig
2026-04-01 15:35   ` Bart Van Assche
2026-04-06  5:50     ` Christoph Hellwig

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=8814db8e-1494-4ea3-ae93-8dd3d714db3d@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=cem@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /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