Skip to content

Commit 34c5de3

Browse files
adam900710kdave
authored andcommitted
btrfs-progs: dump-tree: skip tree-checker when dumpping tree blocks
Since commit c8593f6 ("btrfs-progs: sync tree-checker.[ch] from kernel"), btrfs-progs can do the kernel level tree block checks, which is not really sutiable for dump-tree. Under a lot of cases, we're using dump-tree tool to debug to collect the details from end users. If it's a bitflip causing a rejection, we would be unable to determine the cause. So this patch would add OPEN_CTREE_SKIP_LEAF_ITEM_CHECKS for dump-tree. Reviewed-by: Anand Jain <[email protected]> Signed-off-by: Qu Wenruo <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 4770d59 commit 34c5de3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmds/inspect-dump-tree.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,12 @@ static int cmd_inspect_dump_tree(const struct cmd_struct *cmd,
342342
* Use NO_BLOCK_GROUPS here could also speedup open_ctree() and allow us
343343
* to inspect fs with corrupted extent tree blocks, and show as many good
344344
* tree blocks as possible.
345+
*
346+
* And we want to avoid tree-checker, which can rejects the target tree
347+
* block completely, while we may be debugging the problem.
345348
*/
346-
open_ctree_flags = OPEN_CTREE_PARTIAL | OPEN_CTREE_NO_BLOCK_GROUPS;
349+
open_ctree_flags = OPEN_CTREE_PARTIAL | OPEN_CTREE_NO_BLOCK_GROUPS |
350+
OPEN_CTREE_SKIP_LEAF_ITEM_CHECKS;
347351
cache_tree_init(&block_root);
348352
optind = 0;
349353
while (1) {

0 commit comments

Comments
 (0)