linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] btrfs-progs: print-tree: Minor enhancement along with --bfs/--dfs options
@ 2018-09-28  2:04 Qu Wenruo
  2018-09-28  2:04 ` [PATCH v2 1/6] btrfs-progs: print-tree: Skip deprecated blockptr / nodesize output Qu Wenruo
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Qu Wenruo @ 2018-09-28  2:04 UTC (permalink / raw)
  To: linux-btrfs

This patchset can be fetched from github:
https://github.com/adam900710/btrfs-progs/tree/dump_tree_enhance

The main point of this patchset is to allow "btrfs ins dump-tree" to
print tree blocks in breadth-first order when level is higher than 2.

The 1st patch is just a minor cleanup, to remove some unused and
meaningless output.

The 2nd patch does a root<->fs_info cleanup, provides the basis for
later btrfs_next_sibling_tree_block().

The 3rd patch implements a new function, btrfs_next_sibling_tree_block()
to find next sibling tree block, other than leaf.

The 4th patch implements BFS as bfs_print_children().

The BFS search itself is implemented using path along with
 path::lowest_level and btrfs_next_sibling_tree_block() to iterate all
sibling tree blocks in a level.

The 5th patch adds --bfs/--dfs options for dump-tree.

The final patch changes @follow type from int to bool.

Changelog:
v2:
  Make bfs/dfs selectable by adding --bfs and --dfs options.
  Still keep dfs as default (although I really don't see any
  compatibility problem)
  Add a new patch to change @follow type.

Qu Wenruo (6):
  btrfs-progs: print-tree: Skip deprecated blockptr / nodesize output
  btrfs-progs: Replace root parameter using fs_info for
    reada_for_search()
  btrfs-progs: Introduce function to find next sibling tree block
  btrfs-progs: print-tree: Introduce breadth-first search
  btrfs-progs: print-tree: Introduce --bfs and --dfs options
  btrfs-progs: print-tree: Use bool for @follow

 Documentation/btrfs-inspect-internal.asciidoc |   4 +
 cmds-inspect-dump-tree.c                      |  31 ++--
 cmds-restore.c                                |   4 +-
 ctree.c                                       |  25 +--
 ctree.h                                       |  19 ++-
 print-tree.c                                  | 146 ++++++++++++++----
 print-tree.h                                  |  14 +-
 7 files changed, 188 insertions(+), 55 deletions(-)

-- 
2.19.0


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

end of thread, other threads:[~2018-10-25 16:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-28  2:04 [PATCH v2 0/6] btrfs-progs: print-tree: Minor enhancement along with --bfs/--dfs options Qu Wenruo
2018-09-28  2:04 ` [PATCH v2 1/6] btrfs-progs: print-tree: Skip deprecated blockptr / nodesize output Qu Wenruo
2018-09-28  2:04 ` [PATCH v2 2/6] btrfs-progs: Replace root parameter using fs_info for reada_for_search() Qu Wenruo
2018-09-28  2:04 ` [PATCH v2 3/6] btrfs-progs: Introduce function to find next sibling tree block Qu Wenruo
2018-09-28  2:04 ` [PATCH v2 4/6] btrfs-progs: print-tree: Introduce breadth-first search Qu Wenruo
2018-09-28  2:04 ` [PATCH v2 5/6] btrfs-progs: print-tree: Introduce --bfs and --dfs options Qu Wenruo
2018-09-28  2:04 ` [PATCH v2 6/6] btrfs-progs: print-tree: Use bool for @follow Qu Wenruo
2018-10-25 16:03 ` [PATCH v2 0/6] btrfs-progs: print-tree: Minor enhancement along with --bfs/--dfs options David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).