• Josef Bacik's avatar
    btrfs: convert the io_failure_tree to a plain rb_tree · 87c11705
    Josef Bacik authored
    We still have this oddity of stashing the io_failure_record in the
    extent state for the io_failure_tree, which is leftover from when we
    used to stuff private pointers in extent_io_trees.
    
    However this doesn't make a lot of sense for the io failure records, we
    can simply use a normal rb_tree for this.  This will allow us to further
    simplify the extent_io_tree code by removing the io_failure_rec pointer
    from the extent state.
    
    Convert the io_failure_tree to an rb tree + spinlock in the inode, and
    then use our rb tree simple helpers to insert and find failed records.
    This greatly cleans up this code and makes it easier to separate out the
    extent_io_tree code.
    Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
    Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    87c11705
extent_io.h 9.49 KB