• Qu Wenruo's avatar
    btrfs: remove btrfs_find_ordered_sum call from btrfs_lookup_bio_sums · 9e46458a
    Qu Wenruo authored
    The function btrfs_lookup_bio_sums() is only called for read bios.
    While btrfs_find_ordered_sum() is to search ordered extent sums, which
    is only for write path.
    
    This means to read a page we either:
    
    - Submit read bio if it's not uptodate
      This means we only need to search csum tree for checksums.
    
    - The page is already uptodate
      It can be marked uptodate for previous read, or being marked dirty.
      As we always mark page uptodate for dirty page.
      In that case, we don't need to submit read bio at all, thus no need
      to search any checksums.
    
    Remove the btrfs_find_ordered_sum() call in btrfs_lookup_bio_sums().
    And since btrfs_lookup_bio_sums() is the only caller for
    btrfs_find_ordered_sum(), also remove the implementation.
    Reviewed-by: default avatarNikolay Borisov <nborisov@suse.com>
    Signed-off-by: default avatarQu Wenruo <wqu@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    9e46458a
ordered-data.h 5.75 KB