• Josef Bacik's avatar
    btrfs: cleanup extent buffer readahead · bfb484d9
    Josef Bacik authored
    We're going to pass around more information when we allocate extent
    buffers, in order to make that cleaner how we do readahead.  Most of the
    callers have the parent node that we're getting our blockptr from, with
    the sole exception of relocation which simply has the bytenr it wants to
    read.
    
    Add a helper that takes the current arguments that we need (bytenr and
    gen), and add another helper for simply reading the slot out of a node.
    In followup patches the helper that takes all the extra arguments will
    be expanded, and the simpler helper won't need to have it's arguments
    adjusted.
    Reviewed-by: default avatarFilipe Manana <fdmanana@suse.com>
    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>
    bfb484d9
relocation.c 100 KB