• Nikolay Borisov's avatar
    btrfs: Use btrfs_get_io_geometry appropriately · 89b798ad
    Nikolay Borisov authored
    Presently btrfs_map_block is used not only to do everything necessary to
    map a bio to the underlying allocation profile but it's also used to
    identify how much data could be written based on btrfs' stripe logic
    without actually submitting anything. This is achieved by passing NULL
    for 'bbio_ret' parameter.
    
    This patch refactors all callers that require just the mapping length
    by switching them to using btrfs_io_geometry instead of calling
    btrfs_map_block with a special NULL value for 'bbio_ret'. No functional
    change.
    Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
    Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    89b798ad
inode.c 295 KB