• Qu Wenruo's avatar
    btrfs: allow extent buffer helpers to skip cross-page handling · 397239ed
    Qu Wenruo authored
    Currently btrfs extent buffer helpers are doing all the cross-page
    handling, as there is no guarantee that all those eb pages are
    contiguous.
    
    However on systems with enough memory, there is a very high chance the
    page cache for btree_inode are allocated with physically contiguous
    pages.
    
    In that case, we can skip all the complex cross-page handling, thus
    speeding up the code.
    
    This patch adds a new member, extent_buffer::addr, which is only set to
    non-NULL if all the extent buffer pages are physically contiguous.
    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>
    397239ed
extent_io.c 130 KB