Skip to content

btrfs: merge the two different super block read functions into one

Qu Wenruo linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs: merge btrfs_read_dev_one_super() into btrfs_read_disk_super()fs/btrfs/disk-io.c fs/btrfs/disk-io.h fs/btrfs/super.c +2 more+47 -985 replies
2/2btrfs: get rid of btrfs_read_dev_super()fs/btrfs/disk-io.c fs/btrfs/disk-io.h fs/btrfs/volumes.c+2 -311 reply

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchDavid Sterba
1/2
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] btrfs: merge the two different super block read functions into one

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(-)
Signature · 1 line
2.49.0