public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] btrfs: merge the two different super block read functions into one
@ 2025-04-28  1:15 Qu Wenruo
  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  1:15 ` [PATCH 2/2] btrfs: get rid of btrfs_read_dev_super() Qu Wenruo
  0 siblings, 2 replies; 9+ messages in thread
From: Qu Wenruo @ 2025-04-28  1:15 UTC (permalink / raw)
  To: linux-btrfs

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-04-29  7:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-28  1:15 [PATCH 0/2] btrfs: merge the two different super block read functions into one Qu Wenruo
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox