public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v2 0/3] btrfs: btrfs_bio and btrfs_io_bio rename
Date: Tue, 14 Sep 2021 09:25:40 +0800	[thread overview]
Message-ID: <20210914012543.12746-1-wqu@suse.com> (raw)

The branch can be fetched from github, and is the preferred way to grab
the code, as this patchset changed quite a lot of code.
https://github.com/adam900710/linux/tree/chunk_refactor

There are two structure, btrfs_io_bio and btrfs_bio, which have very
similar names but completely different meanings.

Btrfs_io_bio mostly works at logical bytenr layer (its
bio->bi_iter.bi_sector points to btrfs logical bytenr), and just
contains extra info like csum and mirror_num.

And btrfs_io_bio is in fact the most utilized bio, as all data/metadata
IO is using btrfs_io_bio.

While btrfs_bio is completely a helper structure for stripe IO
submission (RAID56 doesn't utilize it for IO submission).

Such naming is completely anti-human.

So this patchset will do the following renaming:

- btrfs_bio -> btrfs_io_context
  Since it's not really used by all bios (only mirrored profiles utilize
  it), and it contains extra info for RAID56, it's not proper to name it
  with _bio suffix.

  Later we can integrate btrfs_io_context pointer into the new
  btrfs_bio.

- btrfs_io_bio -> btrfs_bio
  I originally plan to rename it to btrfs_logical_bio, but it's a little
  too long for a lot of functions.

Changelog:
v2:
- Rename btrfs_bio to btrfs_io_context (bioc)
- Rename btrfs_io_bio to btrfs_bio
  Both suggested by Nikolay


Qu Wenruo (3):
  btrfs: rename btrfs_bio to btrfs_io_context
  btrfs: remove btrfs_bio_alloc() helper
  btrfs: rename struct btrfs_io_bio to btrfs_bio

 fs/btrfs/check-integrity.c |   4 +-
 fs/btrfs/compression.c     |  20 +--
 fs/btrfs/ctree.h           |   3 +-
 fs/btrfs/disk-io.c         |   2 +-
 fs/btrfs/disk-io.h         |   2 +-
 fs/btrfs/extent-tree.c     |  18 +--
 fs/btrfs/extent_io.c       | 108 ++++++++-------
 fs/btrfs/extent_io.h       |   3 +-
 fs/btrfs/extent_map.c      |   4 +-
 fs/btrfs/file-item.c       |  12 +-
 fs/btrfs/inode.c           |  42 +++---
 fs/btrfs/raid56.c          | 130 +++++++++----------
 fs/btrfs/raid56.h          |   8 +-
 fs/btrfs/reada.c           |  26 ++--
 fs/btrfs/scrub.c           | 130 +++++++++----------
 fs/btrfs/volumes.c         | 260 ++++++++++++++++++-------------------
 fs/btrfs/volumes.h         |  48 +++----
 fs/btrfs/zoned.c           |  16 +--
 18 files changed, 416 insertions(+), 420 deletions(-)

-- 
2.33.0


             reply	other threads:[~2021-09-14  1:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14  1:25 Qu Wenruo [this message]
2021-09-14  1:25 ` [PATCH v2 1/3] btrfs: rename btrfs_bio to btrfs_io_context Qu Wenruo
2021-09-14 16:42   ` David Sterba
2021-09-15  6:02     ` Qu Wenruo
2021-09-14  1:25 ` [PATCH v2 2/3] btrfs: remove btrfs_bio_alloc() helper Qu Wenruo
2021-09-14 16:45   ` David Sterba
2021-09-14  1:25 ` [PATCH v2 3/3] btrfs: rename struct btrfs_io_bio to btrfs_bio Qu Wenruo
2021-09-14 16:49   ` David Sterba
2021-09-14 16:25 ` [PATCH v2 0/3] btrfs: btrfs_bio and btrfs_io_bio rename David Sterba
2021-09-14 22:20   ` 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=20210914012543.12746-1-wqu@suse.com \
    --to=wqu@suse.com \
    --cc=linux-btrfs@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