]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: relocation: Remove is_cowonly_root()
authorQu Wenruo <wqu@suse.com>
Wed, 12 Feb 2020 07:43:31 +0000 (15:43 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2020 16:01:38 +0000 (17:01 +0100)
commit80259de3e546fdbc17971025b6668f01e02cfeb2
tree3c72519bfe13f62453011de6d8bcccc98de441a8
parent85ac4f924a52629f8e9c804d414f17285ac3f67e
btrfs: relocation: Remove is_cowonly_root()

This function is only used in read_fs_root(), which is just a wrapper of
btrfs_get_fs_root().

For all the mentioned essential roots except log root tree,
btrfs_get_fs_root() has its own quick path to grab them from fs_info
directly, thus no need for key.offset modification.

For subvolume trees, btrfs_get_fs_root() with key.offset == -1 is
completely fine.

For log trees and log root tree, it's impossible to hit them, as for
relocation all backrefs are fetched from commit root, which never
records log tree blocks.

Log tree blocks either get freed in regular transaction commit, or
replayed at mount time. At runtime we should never hit an backref for
log tree in extent tree.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/relocation.c