• Jingbo Xu's avatar
    erofs: support large folios for fscache mode · be62c519
    Jingbo Xu authored
    
    
    When large folios supported, one folio can be split into several slices,
    each of which may be mapped to META/UNMAPPED/MAPPED, and the folio can
    be unlocked as a whole only when all slices have completed.
    
    Thus always allocate erofs_fscache_request for each .read_folio() or
    .readahead(), in which case the allocated request is responsible for
    unlocking folios when all slices have completed.
    
    As described above, each folio or folio range can be mapped into several
    slices, while these slices may be mapped to different cookies, and thus
    each slice needs its own netfs_cache_resources.  Here we introduce
    chained requests to support this, where each .read_folio() or
    .readahead() calling can correspond to multiple requests.  Each request
    has its own netfs_cache_resources and thus is used to access one cookie.
    Among these requests, there's a primary request, with the others
    pointing to the primary request.
    Signed-off-by: default avatarJingbo Xu <jefflexu@linux.alibaba.com>
    Reviewed-by: default avatarJia Zhu <zhujia.zj@bytedance.com>
    Link: https://lore.kernel.org/r/20221201074256.16639-2-jefflexu@linux.alibaba.com
    
    Signed-off-by: default avatarGao Xiang <hsiangkao@linux.alibaba.com>
    be62c519
fscache.c 15.4 KB