public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: 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: refactor submit_bio_wait and bio await helpers v2
Date: Mon,  6 Apr 2026 07:57:19 +0200	[thread overview]
Message-ID: <20260406055728.472919-1-hch@lst.de> (raw)

Hi Jens,

this series factors common code between submit_bio_wait and
bio_await_chain into a common helper, and then uses that in XFS
as well instead of open coding such functionality.  It also
cleans up the submit or kill logic in the ioctl handlers to
share more code.

There is another places in btrfs that could be refactored to
use this, although it is non-trivial, and I plan to add more
users of this helper to XFS in the future.

Changes since v1:
 - preserve (and extend) setting REQ_SYNC

Diffstat:
 block/bio.c          |   81 ++++++++++++++++++++++++++++++++-------------------
 block/blk-lib.c      |   16 +---------
 block/blk.h          |    2 -
 block/ioctl.c        |   11 +-----
 fs/xfs/xfs_zone_gc.c |   19 +++--------
 include/linux/bio.h  |    2 +
 6 files changed, 63 insertions(+), 68 deletions(-)

             reply	other threads:[~2026-04-06  5:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-06  5:57 Christoph Hellwig [this message]
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
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

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=20260406055728.472919-1-hch@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=cem@kernel.org \
    --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