]> git.baikalelectronics.ru Git - kernel.git/commit
erofs: add erofs_fscache_read_folios() helper
authorJeffle Xu <jefflexu@linux.alibaba.com>
Mon, 25 Apr 2022 12:21:36 +0000 (20:21 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Tue, 17 May 2022 16:11:19 +0000 (00:11 +0800)
commitc08a886f5d1c108b4c2627b0d971d6f83660565d
treeb69cfcc30f824b30cc21f65ddf51b027cead227a
parentfce37cde1908c952cb5afef14a3a1ed3d2ae4a20
erofs: add erofs_fscache_read_folios() helper

Add erofs_fscache_read_folios() helper reading from fscache. It supports
on-demand read semantics. That is, it will make the backend prepare for
the data when cache miss. Once data ready, it will read from the cache.

This helper can then be used to implement .readpage()/.readahead() of
on-demand read semantics.

Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20220425122143.56815-15-jefflexu@linux.alibaba.com
Acked-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
fs/erofs/fscache.c