• Gao Xiang's avatar
    erofs: tidy up `struct z_erofs_bvec` · 2080ca1e
    Gao Xiang authored
    After revisiting the design, I believe `struct z_erofs_bvec` should
    be page-based instead of folio-based due to the reasons below:
    
     - The minimized memory mapping block is a page;
    
     - Under the certain circumstances, only temporary pages needs to be
       used instead of folios since refcount, mapcount for such pages are
       unnecessary;
    
     - Decompressors handle all types of pages including temporary pages,
       not only folios.
    
    When handling `struct z_erofs_bvec`, all folio-related information
    is now accessed using the page_folio() helper.
    
    The final goal of this round adaptation is to eliminate direct
    accesses to `struct page` in the EROFS codebase, except for some
    exceptions like `z_erofs_is_shortlived_page()` and
    `z_erofs_page_is_invalidated()`, which require a new helper to
    determine the memdesc type of an arbitrary page.
    
    Actually large folios of compressed files seem to work now, yet I tend
    to conduct more tests before officially enabling this for all scenarios.
    Signed-off-by: default avatarGao Xiang <hsiangkao@linux.alibaba.com>
    Link: https://lore.kernel.org/r/20240703120051.3653452-4-hsiangkao@linux.alibaba.com
    2080ca1e
zdata.c 48.9 KB