All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/2] btrfs: merge the two different super block read functions into one
Date: Mon, 28 Apr 2025 10:45:50 +0930	[thread overview]
Message-ID: <cover.1745802753.git.wqu@suse.com> (raw)

We have two functions to read a super block from a block device:

- btrfs_read_dev_one_super()
  Exported from disk-io.c

- btrfs_read_disk_super()
  Local to volumes.c

Which are doing mostly the same thing, so the first patch merge them
into btrfs_read_disk_super().

The second patch removes the btrfs_read_dev_super() function, as it
never really implement the full super blocks scan, and can be replaced
by a btrfs_read_disk_super() call reading the primary super block.

This not only reduce the duplication, but also removes the confusion
between all the similiarly named functions.

Qu Wenruo (2):
  btrfs: merge btrfs_read_dev_one_super() into btrfs_read_disk_super()
  btrfs: get rid of btrfs_read_dev_super()

 fs/btrfs/disk-io.c | 81 +-----------------------------------------
 fs/btrfs/disk-io.h |  3 --
 fs/btrfs/super.c   |  2 +-
 fs/btrfs/volumes.c | 88 +++++++++++++++++++++++-----------------------
 fs/btrfs/volumes.h |  2 ++
 5 files changed, 48 insertions(+), 128 deletions(-)

-- 
2.49.0


             reply	other threads:[~2025-04-28  1:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-28  1:15 Qu Wenruo [this message]
2025-04-28  1:15 ` [PATCH 1/2] btrfs: merge btrfs_read_dev_one_super() into btrfs_read_disk_super() Qu Wenruo
2025-04-28 14:21   ` Johannes Thumshirn
2025-04-28 23:11     ` Qu Wenruo
2025-04-29  7:14   ` David Sterba
2025-04-29  7:22   ` David Sterba
2025-04-29  7:39     ` Qu Wenruo
2025-04-28  1:15 ` [PATCH 2/2] btrfs: get rid of btrfs_read_dev_super() Qu Wenruo
2025-04-29  7:17   ` David Sterba

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=cover.1745802753.git.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.