projects
/
platform
/
upstream
/
btrfs-progs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc04d99
)
Fix print-tree.c to skip blocks it can't read instead of aborting
author
Chris Mason
<chris.mason@oracle.com>
Wed, 13 May 2009 15:27:35 +0000
(11:27 -0400)
committer
Chris Mason
<chris.mason@oracle.com>
Wed, 13 May 2009 15:27:35 +0000
(11:27 -0400)
print-tree.c
patch
|
blob
|
history
diff --git
a/print-tree.c
b/print-tree.c
index
5eb8bfe
..
846d966
100644
(file)
--- a/
print-tree.c
+++ b/
print-tree.c
@@
-450,6
+450,12
@@
void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *eb)
btrfs_node_blockptr(eb, i),
size,
btrfs_node_ptr_generation(eb, i));
+ if (!next) {
+ fprintf(stderr, "failed to read %llu in tree %llu\n",
+ (unsigned long long)btrfs_node_blockptr(eb, i),
+ (unsigned long long)btrfs_header_owner(eb));
+ continue;
+ }
if (btrfs_is_leaf(next) &&
btrfs_header_level(eb) != 1)
BUG();