Skip to content

btrfs-progs: cleanup related to btrfs super block

Qu Wenruo linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3btrfs-progs: unify sizeof(struct btrfs_super_block) and BTRFS_SUPER_INFO_SIZEkernel-shared/ctree.h kernel-shared/disk-io.h+7 -32 replies
2/3btrfs-progs: remove temporary buffer for super blockcmds/filesystem-usage.c cmds/inspect-dump-super.c cmds/rescue-chunk-recover.c +9 more+112 -1480 replies
3/3btrfs-progs: cache csum_size and csum_type in btrfs_fs_infobtrfs-corrupt-block.c check/main.c check/mode-common.c +5 more+22 -230 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] btrfs-progs: cleanup related to btrfs super block

This patchset mostly cleans up the mismatch between BTRFS_SUPER_INFO_SIZE and sizeof(struct btrfs_super_block).

This cleanup itself is going to replace all the following snippets:

	u8 super_block_data[BTRFS_SUPER_INFO_SIZE];
	struct btrfs_super_block *sb;

	sb = (struct btrfs_super_block *)super_block_data;

With:

	struct btrfs_super_block sb;

Also since we're here, also cache csum_type and csum_size in fs_info, just like what we did in the kernel.

Qu Wenruo (3):
btrfs-progs: unify sizeof(struct btrfs_super_block) and
BTRFS_SUPER_INFO_SIZE
btrfs-progs: remove temporary buffer for super block
btrfs-progs: cache csum_size and csum_type in btrfs_fs_info

 btrfs-corrupt-block.c       |  6 +--
 check/main.c                |  6 +--
 check/mode-common.c         |  2 +-
 cmds/filesystem-usage.c     |  8 ++--
 cmds/inspect-dump-super.c   | 11 ++----
 cmds/rescue-chunk-recover.c | 24 ++++++-----
 cmds/rescue-super-recover.c | 11 +++---
 common/device-scan.c        | 23 ++++-------
 common/utils.c              |  8 ++--
 convert/common.c            | 79 +++++++++++++++++--------------------
 convert/main.c              | 29 ++++++--------
 image/main.c                | 14 +++----
 kernel-shared/ctree.h       |  9 +++++
 kernel-shared/disk-io.c     | 41 +++++++++----------
 kernel-shared/disk-io.h     |  3 --
 kernel-shared/file-item.c   | 15 +++----
 kernel-shared/print-tree.c  |  4 +-
 kernel-shared/volumes.c     | 14 +++----
 mkfs/common.c               |  8 ++--
 19 files changed, 141 insertions(+), 174 deletions(-)
Signature · 1 line
2.33.0