]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: tree-checker: Replace root parameter with fs_info
authorQu Wenruo <wqu@suse.com>
Thu, 25 Jan 2018 06:56:18 +0000 (14:56 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Mar 2018 13:09:38 +0000 (15:09 +0200)
commita49e1ecc1b7c71338fb0dff67ec78b486979d461
tree887a2d812915a1c0156c0bb7efc327212de1db69
parentf0c4c72c299a09e24e40254d851dc178ed265e6b
btrfs: tree-checker: Replace root parameter with fs_info

When inspecting the error message with real corruption, the "root=%llu"
always shows "1" (root tree), instead of the correct owner.

The problem is that we are getting @root from page->mapping->host, which
points the same btree inode, so we will always get the same root.

This makes the root owner output meaningless, and harder to port
tree-checker to btrfs-progs.

So get rid of the false and meaningless @root parameter and replace it
with @fs_info.
To get the owner, we can only rely on btrfs_header_owner() now.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c
fs/btrfs/tree-checker.c
fs/btrfs/tree-checker.h