From: Nikolay Borisov <nborisov@suse.com>
To: Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/3] btrfs: rename btrfs_io_bio_alloc() to btrfs_bio_alloc_iovecs()
Date: Tue, 7 Sep 2021 11:53:12 +0300 [thread overview]
Message-ID: <b3a4ed49-c3f4-dda1-4657-f9a913632c21@suse.com> (raw)
In-Reply-To: <20210907074242.103438-2-wqu@suse.com>
On 7.09.21 г. 10:42, Qu Wenruo wrote:
> Function btrfs_io_bio_alloc() is pretty similar to btrfs_bio_alloc(),
> the only major difference is the number of iovecs, and whether bi_sector
> is initialized.
>
> Thus there is no need to add the extra "_io", which is only going to
> cause confusion.
>
> Rename it to btrfs_bio_alloc_iovecs() to be easier to read.
The only difference between those 2 function is the fact that the latter
sets bio->bi_iter.bi_sector. So I'd say those should be turned into 1
function which takes the vecs as parameter as well as the bi_sector.
I've checked all callers of io_bio_alloc and we always have the sector
when allocating the bio. And this can simply be renamed to
btrfs_bio_alloc and be done with it.
<snip>
next prev parent reply other threads:[~2021-09-07 8:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-07 7:42 [PATCH 0/3] btrfs: btrfs_bio and btrfs_io_bio rename Qu Wenruo
2021-09-07 7:42 ` [PATCH 1/3] btrfs: rename btrfs_io_bio_alloc() to btrfs_bio_alloc_iovecs() Qu Wenruo
2021-09-07 8:53 ` Nikolay Borisov [this message]
2021-09-07 7:42 ` [PATCH 2/3] btrfs: rename struct btrfs_io_bio to struct btrfs_logical_bio Qu Wenruo
2021-09-07 9:47 ` Nikolay Borisov
2021-09-07 9:56 ` Qu Wenruo
2021-09-07 7:42 ` [PATCH 3/3] btrfs: rename struct btrfs_bio to btrfs_physical_bio Qu Wenruo
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=b3a4ed49-c3f4-dda1-4657-f9a913632c21@suse.com \
--to=nborisov@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=wqu@suse.com \
/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