aboutsummaryrefslogtreecommitdiff
path: root/fs/erofs/internal.h
diff options
context:
space:
mode:
authorGravatar Gao Xiang <hsiangkao@linux.alibaba.com> 2021-08-13 13:29:31 +0800
committerGravatar Gao Xiang <hsiangkao@linux.alibaba.com> 2021-08-19 00:13:43 +0800
commiteadcd6b5a1eb39866ab8d8a3e4f2e51bc51a2350 (patch)
tree6675343c98541503c6fbfd91d8ced4cec1ead430 /fs/erofs/internal.h
parenterofs: add support for the full decompressed length (diff)
downloadlinux-eadcd6b5a1eb39866ab8d8a3e4f2e51bc51a2350.tar.gz
linux-eadcd6b5a1eb39866ab8d8a3e4f2e51bc51a2350.tar.bz2
linux-eadcd6b5a1eb39866ab8d8a3e4f2e51bc51a2350.zip
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.h5
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)