• Qu Wenruo's avatar
    btrfs: reflink: make copy_inline_to_page() to be subpage compatible · 3115deb3
    Qu Wenruo authored
    The modifications are:
    
    - Page copy destination
      For subpage case, one page can contain multiple sectors, thus we can
      no longer expect the memcpy_to_page()/btrfs_decompress() to copy
      data into page offset 0.
      The correct offset is offset_in_page(file_offset) now, which should
      handle both regular sectorsize and subpage cases well.
    
    - Page status update
      Now we need to use subpage helper to handle the page status update.
    
    Tested-by: Ritesh Harjani <riteshh@linux.ibm.com> # [ppc64]
    Tested-by: Anand Jain <anand.jain@oracle.com> # [aarch64]
    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>
    3115deb3
reflink.c 27.4 KB