Skip to content

btrfs-progs: Split original mode check to its own

Qu Wenruo linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 of 3 patches 2 repliesIn review

1 of 3 patches is in this archive. The cover letter announces 3.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
3/3btrfs-progs: Move check/main.c to cmds-check.c to maintain the subcommand hierarchyMakefile cmds-check.c+4 -210 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: Split original mode check to its own

This time, there are 2 patches too large to reach mail list, so please fetch the whole patchset from github as usual:
https://github.com/adam900710/btrfs-progs/tree/split_check_part2

The branch is based on devel branch, whose HEAD is:
commit 3aa1bbdd89ee9c9c48d260a6192fae08328f1b2f (david/devel)

Author: David Sterba <[email protected]>
Date:   Sat Feb 3 01:15:42 2018 +0100

btrfs-progs: mkfs: fix build on musl

Another build failure on musl.

Issue: #90

The first patch moves remaining common code to mode-common.c. Things like transid fix, which is handled in read_tree_block(), get moved to mode-common.c.
And commented added for exported functions.

The 2nd patch moves the original mode code to mode-original.c. Unlike lowmem mode, original mode has more functions exported, as things like bad items repair is integrated into the main funtion.

The last patch moves check/main.c back to cmds-check.c to keep subcommand hierarchy.

With the split done, we now have a clear view about the check code size:

$ wc -l check/*.[ch] cmds-check.c | sort -h
    67 check/mode-lowmem.h
   137 check/mode-common.h
   308 check/mode-original.h
   661 cmds-check.c
  2062 check/mode-common.c
  4573 check/mode-lowmem.c
  7577 check/mode-original.c

Qu Wenruo (3):
btrfs-progs: check: Move more shared codes to mode-common.c
btrfs-progs: Move the remaining original mode code to mode-original.c
btrfs-progs: Move check/main.c to cmds-check.c to maintain the
subcommand hierarchy

 Makefile                          |    7 +-
 check/mode-common.c               | 1711 +++++++++
 check/mode-common.h               |   39 +-
 check/{main.c => mode-original.c} | 6954 ++++++++++++-------------------------
 check/mode-original.h             |   32 +-
 cmds-check.c                      |  661 ++++
 6 files changed, 4742 insertions(+), 4662 deletions(-)
 rename check/{main.c => mode-original.c} (76%)
 create mode 100644 cmds-check.c
Signature · 1 line
2.16.1