From: Matthew Sakai <msakai@redhat.com>
To: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>
Cc: Tejun Heo <tj@kernel.org>, Josef Bacik <josef@toxicpanda.com>,
Mike Snitzer <snitzer@kernel.org>,
Mikulas Patocka <mpatocka@redhat.com>, Chris Mason <clm@fb.com>,
David Sterba <dsterba@suse.com>,
dm-devel@lists.linux.dev, cgroups@vger.kernel.org,
linux-block@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/4] block: add a bio_list_merge_init helper
Date: Thu, 28 Mar 2024 14:29:27 -0400 [thread overview]
Message-ID: <2ae69d9f-a42c-00d7-f9eb-e93c071153ce@redhat.com> (raw)
In-Reply-To: <20240328084147.2954434-2-hch@lst.de>
On 3/28/24 04:41, Christoph Hellwig wrote:
> This is a simple combination of bio_list_merge + bio_list_init
> similar to list_splice_init. While it only saves a single
> line in a callers, it makes the move all bios from one list to
> another and reinitialize the original pattern a lot more obvious
> in the callers.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> include/linux/bio.h | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/include/linux/bio.h b/include/linux/bio.h
> index 875d792bffff82..9b8a369f44bc6b 100644
> --- a/include/linux/bio.h
> +++ b/include/linux/bio.h
> @@ -615,6 +615,13 @@ static inline void bio_list_merge(struct bio_list *bl, struct bio_list *bl2)
> bl->tail = bl2->tail;
> }
>
> +static inline void bio_list_merge_init(struct bio_list *bl,
> + struct bio_list *bl2)
Nit: The indentation in this line looks off to me.
Otherwise, for the series:
Reviewed-by: Matthew Sakai <msakai@redhat.com>
> +{
> + bio_list_merge(bl, bl2);
> + bio_list_init(bl2);
> +}
> +
> static inline void bio_list_merge_head(struct bio_list *bl,
> struct bio_list *bl2)
> {
next prev parent reply other threads:[~2024-03-28 18:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-28 8:41 add a bio_list_merge_init helper Christoph Hellwig
2024-03-28 8:41 ` [PATCH 1/4] block: " Christoph Hellwig
2024-03-28 18:29 ` Matthew Sakai [this message]
2024-03-28 8:41 ` [PATCH 2/4] blk-cgroup: use bio_list_merge_init Christoph Hellwig
2024-03-28 8:41 ` [PATCH 3/4] dm: " Christoph Hellwig
2024-03-29 14:01 ` Mike Snitzer
2024-03-28 8:41 ` [PATCH 4/4] btrfs " Christoph Hellwig
2024-03-28 19:16 ` David Sterba
2024-03-28 9:00 ` add a bio_list_merge_init helper Damien Le Moal
2024-03-28 12:21 ` Johannes Thumshirn
2024-03-29 18:32 ` 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 \
--in-reply-to=2ae69d9f-a42c-00d7-f9eb-e93c071153ce@redhat.com \
--to=msakai@redhat.com \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=clm@fb.com \
--cc=dm-devel@lists.linux.dev \
--cc=dsterba@suse.com \
--cc=hch@lst.de \
--cc=josef@toxicpanda.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=snitzer@kernel.org \
--cc=tj@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