diff options
author | Gao Xiang <hsiangkao@linux.alibaba.com> | 2021-08-13 13:29:31 +0800 |
---|---|---|
committer | Gao Xiang <hsiangkao@linux.alibaba.com> | 2021-08-19 00:13:43 +0800 |
commit | eadcd6b5a1eb39866ab8d8a3e4f2e51bc51a2350 (patch) | |
tree | 6675343c98541503c6fbfd91d8ced4cec1ead430 /fs/erofs/internal.h | |
parent | d95ae5e25326092d61613acf98280270dde22778 (diff) | |
download | linux-eadcd6b5a1eb39866ab8d8a3e4f2e51bc51a2350.tar.bz2 |
erofs: add fiemap support with iomap
This adds fiemap support for both uncompressed files and compressed
files by using iomap infrastructure.
Link: https://lore.kernel.org/r/20210813052931.203280-3-hsiangkao@linux.alibaba.com
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Diffstat (limited to 'fs/erofs/internal.h')
-rw-r--r-- | fs/erofs/internal.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/erofs/internal.h b/fs/erofs/internal.h index a9fc5245015b..91089ab8a816 100644 --- a/fs/erofs/internal.h +++ b/fs/erofs/internal.h @@ -15,6 +15,7 @@ #include <linux/magic.h> #include <linux/slab.h> #include <linux/vmalloc.h> +#include <linux/iomap.h> #include "erofs_fs.h" /* redefine pr_fmt "erofs: " */ @@ -363,6 +364,8 @@ struct erofs_map_blocks { #define EROFS_GET_BLOCKS_FIEMAP 0x0002 /* zmap.c */ +extern const struct iomap_ops z_erofs_iomap_report_ops; + #ifdef CONFIG_EROFS_FS_ZIP int z_erofs_fill_inode(struct inode *inode); int z_erofs_map_blocks_iter(struct inode *inode, @@ -381,6 +384,8 @@ static inline int z_erofs_map_blocks_iter(struct inode *inode, /* data.c */ extern const struct file_operations erofs_file_fops; struct page *erofs_get_meta_page(struct super_block *sb, erofs_blk_t blkaddr); +int erofs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, + u64 start, u64 len); /* inode.c */ static inline unsigned long erofs_inode_hash(erofs_nid_t nid) |