Skip to content
  • Chris Mason's avatar
    Btrfs: Don't pin pages in ram until the entire ordered extent is on disk. · ba1da2f4
    Chris Mason authored
    
    
    Checksum items are not inserted until the entire ordered extent is on disk,
    but individual pages might be clean and available for reclaim long before
    the whole extent is on disk.
    
    In order to allow those pages to be freed, we need to be able to search
    the list of ordered extents to find the checksum that is going to be inserted
    in the tree.  This way if the page needs to be read back in before
    the checksums are in the btree, we'll be able to verify the checksum on
    the page.
    
    This commit adds the ability to search the pending ordered extents for
    a given offset in the file, and changes btrfs_releasepage to allow
    ordered pages to be freed.
    
    Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
    ba1da2f4