• Qu Wenruo's avatar
    btrfs: relocation: Remove is_cowonly_root() · e1922118
    Qu Wenruo authored
    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: default avatarJosef Bacik <josef@toxicpanda.com>
    Signed-off-by: default avatarQu Wenruo <wqu@suse.com>
    Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    e1922118
relocation.c 118 KB