Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 2/3] btrfs: rename struct btrfs_io_bio to struct btrfs_logical_bio
Date: Tue, 7 Sep 2021 12:47:27 +0300	[thread overview]
Message-ID: <95fd7c35-a100-6aca-64e2-c396420a8fda@suse.com> (raw)
In-Reply-To: <20210907074242.103438-3-wqu@suse.com>



On 7.09.21 г. 10:42, Qu Wenruo wrote:
> In btrfs there are at least 4 types of different bios currently:
> 
> - btrfs_io_bio
>   It's used to specify IO for logical bytenr

Perhaps this structure needs to be turned into a btrfs_bio.

> 
> - btrfs_bio
>   It's real physical bio

It's not even that, because btrfs_bio itself is not submitted at all,
it's really some sort of a semaphore, which is used to signal all stripe
bios i.e those bios which are submitted to the actual devices have
completed. In that regard it's not even a bio per-se, more like an
io_context.

> 
> - compressed_bio
>   Only used for compressed read write.

This should be compressed_io_ctx or some such.

> 
> - btrfs_raid_bio
>   Only used by RAID56
> 
> The naming of btrfs_bio and btrfs_io_bio is just anti-human.
> 
> Rename btrfs_io_bio to btrfs_logical_bio, and all involved helpers to
> make clear at which layer the bio works.
> 
> Since we're here, also add extra comments on critical members like
> @mirror_num.
> 
> Signed-off-by: Qu Wenruo <wqu@suse.com>

<snip>

  reply	other threads:[~2021-09-07  9:47 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
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 [this message]
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=95fd7c35-a100-6aca-64e2-c396420a8fda@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