• Qu Wenruo's avatar
    btrfs: migrate to use folio private instead of page private · cfbf07e2
    Qu Wenruo authored
    As a cleanup and preparation for future folio migration, this patch
    would replace all page->private to folio version.  This includes:
    
    - PagePrivate()
      -> folio_test_private()
    
    - page->private
      -> folio_get_private()
    
    - attach_page_private()
      -> folio_attach_private()
    
    - detach_page_private()
      -> folio_detach_private()
    
    Since we're here, also remove the forced cast on page->private, since
    it's (void *) already, we don't really need to do the cast.
    
    For now even if we missed some call sites, it won't cause any problem
    yet, as we're only using order 0 folio (single page), thus all those
    folio/page flags should be synced.
    
    But for the future conversion to utilize higher order folio, the page
    <-> folio flag sync is no longer guaranteed, thus we have to migrate to
    utilize folio flags.
    Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
    Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
    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>
    cfbf07e2
subpage.c 24.8 KB