diff options
author | Jingbo Xu <jefflexu@linux.alibaba.com> | 2024-03-08 10:41:59 +0100 |
---|---|---|
committer | Gao Xiang <hsiangkao@linux.alibaba.com> | 2024-03-10 11:41:32 +0100 |
commit | a1bafc3109d713ed83f73d61ba5cb1e6fd80fdbc (patch) | |
tree | 571d0ec5d9a882da7e093e983e251955be9fb2f0 /fs/erofs/internal.h | |
parent | erofs: make iov_iter describe target buffers over fscache (diff) | |
download | linux-a1bafc3109d713ed83f73d61ba5cb1e6fd80fdbc.tar.xz linux-a1bafc3109d713ed83f73d61ba5cb1e6fd80fdbc.zip |
erofs: support compressed inodes over fscache
Since fscache can utilize iov_iter to write dest buffers, bio_vec can
be used in this way too.
To simplify this, pseudo bios are prepared and bio_vec will be filled
with bio_add_page(). And a common .bi_end_io will be called directly
to handle I/O completions.
Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20240308094159.40547-2-jefflexu@linux.alibaba.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Diffstat (limited to 'fs/erofs/internal.h')
-rw-r--r-- | fs/erofs/internal.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/erofs/internal.h b/fs/erofs/internal.h index f8623113be6c..92120bf4ab71 100644 --- a/fs/erofs/internal.h +++ b/fs/erofs/internal.h @@ -512,6 +512,8 @@ void erofs_fscache_unregister_fs(struct super_block *sb); struct erofs_fscache *erofs_fscache_register_cookie(struct super_block *sb, char *name, unsigned int flags); void erofs_fscache_unregister_cookie(struct erofs_fscache *fscache); +struct bio *erofs_fscache_bio_alloc(struct erofs_map_dev *mdev); +void erofs_fscache_submit_bio(struct bio *bio); #else static inline int erofs_fscache_register_fs(struct super_block *sb) { @@ -529,6 +531,8 @@ struct erofs_fscache *erofs_fscache_register_cookie(struct super_block *sb, static inline void erofs_fscache_unregister_cookie(struct erofs_fscache *fscache) { } +static inline struct bio *erofs_fscache_bio_alloc(struct erofs_map_dev *mdev) { return NULL; } +static inline void erofs_fscache_submit_bio(struct bio *bio) {} #endif #define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */ |