btrfs-progs: dump-tree: allow -b multiple times
Subsystems (2)
cover btrfs-progs: dump-tree: allow -b multiple times
Although just one patch, it needs the extent buffer cleanup code as basis, so please fetch it from my github repo:
https://github.com/adam900710/btrfs-progs/tree/dump_tree_multi_blocks
This patch allow -b to be specified multiple times, and add extra basic check for them.
For later enhancement (Issue: #113) it needs extra work to handle special roots.
Qu Wenruo (1):
btrfs-progs: inspect-dump-tree: Allow '-b|--block' to be specified
multiple times
Documentation/btrfs-inspect-internal.asciidoc | 2 +- cmds-inspect-dump-tree.c | 108 ++++++++++++++---- 2 files changed, 89 insertions(+), 21 deletions(-)
Signature · 1 line
2.17.0
PATCH 1/1 btrfs-progs: inspect-dump-tree: Allow '-b|--block' to be specified multiple times
Reuse extent-cache facility to record multiple bytenr so '-b|--block' can be specified multiple times.
Despite that, add a sector size alignment check before we try to print a tree block.
(Please note that, nodesize alignment check is not suitable here as meta chunk start bytenr could be unaligned to nodesize)
--- Documentation/btrfs-inspect-internal.asciidoc | 2 +- cmds-inspect-dump-tree.c | 108 ++++++++++++++---- 2 files changed, 89 insertions(+), 21 deletions(-)
Documentation/btrfs-inspect-internal.asciidoc +1 -1
@@ -86,7 +86,7 @@ the respective tree root block offset -u|--uuid:::: print only the uuid tree information, empty output if the tree does not exist -b <block_num>:::: -print info of the specified block only +print info of the specified block only, can be specified multiple times. --follow:::: use with '-b', print all children tree blocks of '<block_num>' -t <tree_id>::::
cmds-inspect-dump-tree.c +88 -20
142 lines not on this page · raw message
Signature · 1 line
2.17.0
PATCH v2 1/1 btrfs-progs: inspect-dump-tree: Allow '-b|--block' to be specified multiple times
In reply to Qu WenruoReuse extent-cache facility to record multiple bytenr so '-b|--block' can be specified multiple times.
Despite that, add a sector size alignment check before we try to print a tree block.
(Please note that, nodesize alignment check is not suitable here as meta chunk start bytenr could be unaligned to nodesize)
---
changelog:
v2:
Fix memory leak detected by asan.
Fix NULL pointer derefenrece detected by asan.
--- Documentation/btrfs-inspect-internal.asciidoc | 2 +- cmds-inspect-dump-tree.c | 109 +++++++++++++++--- 2 files changed, 91 insertions(+), 20 deletions(-)
Documentation/btrfs-inspect-internal.asciidoc +1 -1
@@ -86,7 +86,7 @@ the respective tree root block offset -u|--uuid:::: print only the uuid tree information, empty output if the tree does not exist -b <block_num>:::: -print info of the specified block only +print info of the specified block only, can be specified multiple times. --follow:::: use with '-b', print all children tree blocks of '<block_num>' -t <tree_id>::::
cmds-inspect-dump-tree.c +90 -19
149 lines not on this page · raw message
Signature · 1 line
2.17.0
Quoted 3 lines · Qu Wenruo
Although just one patch, it needs the extent buffer cleanup code as basis, so please fetch it from my github repo:
https://github.com/adam900710/btrfs-progs/tree/dump_tree_multi_blocks
Could you please refresh the patch on a recent devel? The branches have diverged too much over time, sorry.
Quoted 7 lines · David Sterba
Quoted 3 lines · Qu Wenruo
Although just one patch, it needs the extent buffer cleanup code as basis, so please fetch it from my github repo:
https://github.com/adam900710/btrfs-progs/tree/dump_tree_multi_blocksCould you please refresh the patch on a recent devel? The branches have diverged too much over time, sorry.
Not a problem at all.
For such case just ask and I'll handle it.
Thanks,
Qu
Quoted 5 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html