[PATCH 1/2] erofs: make iov_iter describe target buffers over fscache

Gao Xiang hsiangkao at linux.alibaba.com
Fri Mar 8 20:53:25 AEDT 2024



On 2024/3/8 17:41, Jingbo Xu wrote:
> So far the fscache mode supports uncompressed data only, and the data
> read from fscache is put directly into the target page cache.  As the
> support for compressed data in fscache mode is going to be introduced,
> rework the fscache internals so that the following compressed part
> could make the raw data read from fscache be directed to the target
> buffer it wants, decompress the raw data, and finally fill the page
> cache with the decompressed data.
> 
> As the first step, a new structure, i.e. erofs_fscache_io (io), is
> introduced to describe a generic read request from the fscache, while
> the caller can specify the target buffer it wants in the iov_iter
> structure (io->iter).  Besides, the caller can also specify its
> completion callback and private data through erofs_fscache_io, which
> will be called to make further handling, e.g. unlocking the page cache
> for uncompressed data or decompressing the read raw data, when the read
> request from the fscache completes.  Now erofs_fscache_read_io_async()
> serves as a generic interface for reading raw data from fscache for both
> compressed and uncompressed data.
> 
> The erofs_fscache_rq structure is kept to describe a request to fill the
> page cache in the specified range.
> 
> Signed-off-by: Jingbo Xu <jefflexu at linux.alibaba.com>

As we discussed offline, for the whole series:
Reviewed-by: Gao Xiang <hsiangkao at linux.alibaba.com>

Thanks for the work!

Thanks,
Gao Xiang


More information about the Linux-erofs mailing list