• J
    btrfs: pass root owner to read_tree_block · 1b7ec85e
    Josef Bacik 提交于
    In order to properly set the lockdep class of a newly allocated block we
    need to know the owner of the block.  For non-refcounted trees this is
    straightforward, we always know in advance what tree we're reading from.
    For refcounted trees we don't necessarily know, however all refcounted
    trees share the same lockdep class name, tree-<level>.
    
    Fix all the callers of read_tree_block() to pass in the root objectid
    we're using.  In places like relocation and backref we could probably
    unconditionally use 0, but just in case use the root when we have it,
    otherwise use 0 in the cases we don't have the root as it's going to be
    a refcounted tree anyway.
    
    This is a preparation patch for further changes.
    Reviewed-by: NFilipe Manana <fdmanana@suse.com>
    Signed-off-by: NJosef Bacik <josef@toxicpanda.com>
    Reviewed-by: NDavid Sterba <dsterba@suse.com>
    Signed-off-by: NDavid Sterba <dsterba@suse.com>
    1b7ec85e
qgroup.c 108.8 KB