aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGao Xiang <hsiangkao@linux.alibaba.com>2021-11-16 17:49:39 +0800
committerGao Xiang <hsiangkao@linux.alibaba.com>2021-11-18 22:37:13 +0800
commit89cfcc4388187f97fecafdf163551e263c5fe479 (patch)
treed4ef8372eb63d4c75804d5caeb1d30834f2f7fe3 /include
parent24f310453b01cd17da6f942f05a767db11cd90d4 (diff)
downloaderofs-utils-89cfcc4388187f97fecafdf163551e263c5fe479.tar.gz
erofs-utils: get compression algorithms directly on mapping
Keep in sync with the latest kernel commit 8f89926290c4 ("erofs: get compression algorithms directly on mapping") And it also fixes fsck MicroLZMA support, btw. Link: https://lore.kernel.org/r/20211116094939.32246-7-hsiangkao@linux.alibaba.com Reviewed-by: Yue Hu <huyue2@yulong.com> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Diffstat (limited to 'include')
-rw-r--r--include/erofs/decompress.h5
-rw-r--r--include/erofs/internal.h12
2 files changed, 9 insertions, 8 deletions
diff --git a/include/erofs/decompress.h b/include/erofs/decompress.h
index 0ba2b08..3d0d963 100644
--- a/include/erofs/decompress.h
+++ b/include/erofs/decompress.h
@@ -8,11 +8,6 @@
#include "internal.h"
-enum {
- Z_EROFS_COMPRESSION_SHIFTED = Z_EROFS_COMPRESSION_MAX,
- Z_EROFS_COMPRESSION_RUNTIME_MAX
-};
-
struct z_erofs_decompress_req {
char *in, *out;
diff --git a/include/erofs/internal.h b/include/erofs/internal.h
index 93e05bb..666d1f2 100644
--- a/include/erofs/internal.h
+++ b/include/erofs/internal.h
@@ -252,7 +252,7 @@ static inline const char *erofs_strerror(int err)
enum {
BH_Meta,
BH_Mapped,
- BH_Zipped,
+ BH_Encoded,
BH_FullMapped,
};
@@ -260,8 +260,8 @@ enum {
#define EROFS_MAP_MAPPED (1 << BH_Mapped)
/* Located in metadata (could be copied from bd_inode) */
#define EROFS_MAP_META (1 << BH_Meta)
-/* The extent has been compressed */
-#define EROFS_MAP_ZIPPED (1 << BH_Zipped)
+/* The extent is encoded */
+#define EROFS_MAP_ENCODED (1 << BH_Encoded)
/* The length of extent is full */
#define EROFS_MAP_FULL_MAPPED (1 << BH_FullMapped)
@@ -272,6 +272,7 @@ struct erofs_map_blocks {
u64 m_plen, m_llen;
unsigned short m_deviceid;
+ char m_algorithmformat;
unsigned int m_flags;
erofs_blk_t index;
};
@@ -282,6 +283,11 @@ struct erofs_map_blocks {
*/
#define EROFS_GET_BLOCKS_FIEMAP 0x0002
+enum {
+ Z_EROFS_COMPRESSION_SHIFTED = Z_EROFS_COMPRESSION_MAX,
+ Z_EROFS_COMPRESSION_RUNTIME_MAX
+};
+
struct erofs_map_dev {
erofs_off_t m_pa;
unsigned int m_deviceid;