• Christoph Hellwig's avatar
    btrfs: always read the entire extent_buffer · e9538283
    Christoph Hellwig authored
    Currently read_extent_buffer_pages skips pages that are already uptodate
    when reading in an extent_buffer.  While this reduces the amount of data
    read, it increases the number of I/O operations as we now need to do
    multiple I/Os when reading an extent buffer with one or more uptodate
    pages in the middle of it.  On any modern storage device, be that hard
    drives or SSDs this actually decreases I/O performance.  Fortunately
    this case is pretty rare as the pages are always initially read together
    and then aged the same way.  Besides simplifying the code a bit as-is
    this will allow for major simplifications to the I/O completion handler
    later on.
    
    Note that the case where all pages are uptodate is still handled by an
    optimized fast path that does not read any data from disk.
    Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
    Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    e9538283
extent_io.c 140 KB