• Qu Wenruo's avatar
    btrfs: migrate subpage code to folio interfaces · 55151ea9
    Qu Wenruo authored
    Although subpage itself is conflicting with higher folio, since subpage
    (sectorsize < PAGE_SIZE and nodesize < PAGE_SIZE) means we will never
    need higher order folio, there is a hidden pitfall:
    
    - btrfs_page_*() helpers
    
    Those helpers are an abstraction to handle both subpage and non-subpage
    cases, which means we're going to pass pages pointers to those helpers.
    
    And since those helpers are shared between data and metadata paths, it's
    unavoidable to let them to handle folios, including higher order
    folios).
    
    Meanwhile for true subpage case, we should only have a single page
    backed folios anyway, thus add a new ASSERT() for btrfs_subpage_assert()
    to ensure that.
    
    Also since those helpers are shared between both data and metadata, add
    some extra ASSERT()s for data path to make sure we only get single page
    backed folio for now.
    Signed-off-by: default avatarQu Wenruo <wqu@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    55151ea9
inode.c 314 KB