From: Andreas Gruenbacher <agruenba@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: dm-devel@lists.linux.dev,
Andreas Gruenbacher <agruenba@redhat.com>,
linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-block@vger.kernel.org, linux-bcache@vger.kernel.org,
Christoph Hellwig <hch@lst.de>,
drbd-dev@lists.linbit.com
Subject: [PATCH 3/4] bio: rename bio_chain arguments
Date: Wed, 4 Mar 2026 20:04:08 +0100 [thread overview]
Message-ID: <20260304190424.291743-4-agruenba@redhat.com> (raw)
In-Reply-To: <20260304190424.291743-1-agruenba@redhat.com>
Use the same argument names in bio_chain() as in bio_chain_and_submit()
to be consistent. Slightly improve the function description.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
block/bio.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/block/bio.c b/block/bio.c
index eadf4c1e9994..5e60bf3730af 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -369,22 +369,22 @@ static void bio_chain_endio(struct bio *bio)
/**
* bio_chain - chain bio completions
- * @bio: the target bio
- * @parent: the parent bio of @bio
+ * @prev: the bio to chain
+ * @new: the bio to chain to
*
- * The caller won't have a bi_end_io called when @bio completes - instead,
- * @parent's bi_end_io won't be called until both @parent and @bio have
- * completed; the chained bio will also be freed when it completes.
+ * The caller won't have a bi_end_io called when @prev completes. Instead,
+ * @new's bi_end_io will be called once both @new and @prev have completed.
+ * Like an unchained bio, @prev will be put when it completes.
*
- * The caller must not set bi_private or bi_end_io in @bio.
+ * The caller must not set bi_private or bi_end_io in @prev.
*/
-void bio_chain(struct bio *bio, struct bio *parent)
+void bio_chain(struct bio *prev, struct bio *new)
{
- BUG_ON(bio->bi_private || bio->bi_end_io);
+ BUG_ON(prev->bi_private || prev->bi_end_io);
- bio->bi_private = parent;
- bio->bi_end_io = bio_chain_endio;
- bio_inc_remaining(parent);
+ prev->bi_private = new;
+ prev->bi_end_io = bio_chain_endio;
+ bio_inc_remaining(new);
}
EXPORT_SYMBOL(bio_chain);
--
2.52.0
next prev parent reply other threads:[~2026-03-04 19:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-04 19:04 [PATCH 0/4] simple bio cleanups Andreas Gruenbacher
2026-03-04 19:04 ` [PATCH 1/4] block: consecutive blk_status_t error codes Andreas Gruenbacher
2026-03-05 14:12 ` Christoph Hellwig
2026-03-05 22:36 ` John Garry
2026-03-04 19:04 ` [PATCH 2/4] block: get rid of blk_status_to_{errno, str} inconsistency Andreas Gruenbacher
2026-03-05 14:13 ` [PATCH 2/4] block: get rid of blk_status_to_{errno,str} inconsistency Christoph Hellwig
2026-03-06 15:51 ` John Garry
2026-03-04 19:04 ` Andreas Gruenbacher [this message]
2026-03-04 19:04 ` [PATCH 4/4] bio: use bio_io_error more often Andreas Gruenbacher
2026-03-05 14:14 ` Christoph Hellwig
2026-03-05 18:37 ` Andreas Gruenbacher
2026-03-05 14:32 ` Coly Li
2026-03-13 12:53 ` [PATCH 0/4] simple bio cleanups Shinichiro Kawasaki
2026-03-13 14:35 ` Andreas Gruenbacher
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=20260304190424.291743-4-agruenba@redhat.com \
--to=agruenba@redhat.com \
--cc=axboe@kernel.dk \
--cc=dm-devel@lists.linux.dev \
--cc=drbd-dev@lists.linbit.com \
--cc=hch@lst.de \
--cc=linux-bcache@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@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