diff options
author | Jeffle Xu <jefflexu@linux.alibaba.com> | 2022-04-25 14:21:40 +0200 |
---|---|---|
committer | Gao Xiang <hsiangkao@linux.alibaba.com> | 2022-05-17 18:11:20 +0200 |
commit | 1442b02b66ad2c568f9d5178b7c3c1287b37e438 (patch) | |
tree | 05ebb5aaed63fc0f7c5f489f88de9f50fc235e82 /fs/erofs/inode.c | |
parent | erofs: implement fscache-based metadata read (diff) | |
download | linux-1442b02b66ad2c568f9d5178b7c3c1287b37e438.tar.xz linux-1442b02b66ad2c568f9d5178b7c3c1287b37e438.zip |
erofs: implement fscache-based data read for non-inline layout
Implement the data plane of reading data from data blobs over fscache
for non-inline layout.
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-19-jefflexu@linux.alibaba.com
Acked-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Diffstat (limited to 'fs/erofs/inode.c')
-rw-r--r-- | fs/erofs/inode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/erofs/inode.c b/fs/erofs/inode.c index 6c28ed75dc82..bcc8335b46b3 100644 --- a/fs/erofs/inode.c +++ b/fs/erofs/inode.c @@ -292,6 +292,10 @@ static int erofs_fill_inode(struct inode *inode, int isdir) goto out_unlock; } inode->i_mapping->a_ops = &erofs_raw_access_aops; +#ifdef CONFIG_EROFS_FS_ONDEMAND + if (erofs_is_fscache_mode(inode->i_sb)) + inode->i_mapping->a_ops = &erofs_fscache_access_aops; +#endif out_unlock: erofs_put_metabuf(&buf); |