summaryrefslogtreecommitdiff
path: root/version.sh
diff options
context:
space:
mode:
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>2014-05-28 19:20:39 +0800
committerDavid Sterba <dsterba@suse.cz>2014-10-10 18:11:32 +0200
commit31aa2b5fa7fad6b4bc382b9e40d5b44f856a3f53 (patch)
tree280d71e396e027919a293edb9729ccb9638db087 /version.sh
parentd0588bfa479409b2a0f6243f894338a01a56221a (diff)
Btrfs-progs: fsck: disallow partial opening if critical roots corrupted
If btrfs tree root is corrupted, fsck will hit the following segmentation. enabling repair mode Check tree block failed, want=29376512, have=0 Check tree block failed, want=29376512, have=0 Check tree block failed, want=29376512, have=0 Check tree block failed, want=29376512, have=0 Check tree block failed, want=29376512, have=0 read block failed check_tree_block Couldn't read tree root Checking filesystem on /dev/sda9 UUID: 0e1a754d-04a5-4256-ae79-0f769751803e Critical roots corrupted, unable to fsck the FS Segmentation fault (core dumped) In btrfs_setup_all_roots(), we could tolerate some trees(extent tree, csum tree) corrupted, and we have did careful check inside that function, it will return NULL if critial roots corrupt(for example tree root). The problem is that we check @OPEN_CTREE_PARTIAL flag again after calling btrfs_setup_all_roots() which will successfully return @fs_info though critial roots corrupted. Fix this problem by removing @OPEN_CTREE_PARTIAL flag check outsize btrfs_setup_all_roots(). Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'version.sh')
0 files changed, 0 insertions, 0 deletions