aboutsummaryrefslogtreecommitdiff
path: root/fs/erofs/internal.h
diff options
context:
space:
mode:
authorGravatar Gao Xiang <hsiangkao@linux.alibaba.com> 2021-08-18 23:22:31 +0800
committerGravatar Gao Xiang <hsiangkao@linux.alibaba.com> 2021-08-19 00:13:26 +0800
commitd95ae5e25326092d61613acf98280270dde22778 (patch)
tree36b5925910fee454c0cfe5876d7d1762876c4259 /fs/erofs/internal.h
parenterofs: remove the mapping parameter from erofs_try_to_free_cached_page() (diff)
downloadlinux-d95ae5e25326092d61613acf98280270dde22778.tar.gz
linux-d95ae5e25326092d61613acf98280270dde22778.tar.bz2
linux-d95ae5e25326092d61613acf98280270dde22778.zip
erofs: add support for the full decompressed length
Previously, there is no need to get the full decompressed length since EROFS supports partial decompression. However for some other cases such as fiemap, the full decompressed length is necessary for iomap to make it work properly. This patch adds a way to get the full decompressed length. Note that it takes more metadata overhead and it'd be avoided if possible in the performance sensitive scenario. Link: https://lore.kernel.org/r/20210818152231.243691-1-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 25b094085ca6..a9fc5245015b 100644
--- a/fs/erofs/internal.h
+++ b/fs/erofs/internal.h
@@ -356,6 +356,11 @@ struct erofs_map_blocks {
/* Flags used by erofs_map_blocks_flatmode() */
#define EROFS_GET_BLOCKS_RAW 0x0001
+/*
+ * Used to get the exact decompressed length, e.g. fiemap (consider lookback
+ * approach instead if possible since it's more metadata lightweight.)
+ */
+#define EROFS_GET_BLOCKS_FIEMAP 0x0002
/* zmap.c */
#ifdef CONFIG_EROFS_FS_ZIP