summaryrefslogtreecommitdiffstats
path: root/fs/erofs/zdata.h
diff options
context:
space:
mode:
authorGao Xiang <hsiangkao@linux.alibaba.com>2021-10-11 05:31:45 +0800
committerGao Xiang <hsiangkao@linux.alibaba.com>2021-10-19 23:44:30 +0800
commit622ceaddb7649ca328832f50ba1400af778d75fa (patch)
tree6e6a3db1cff711620944b9e283c2bd5f4dbd6171 /fs/erofs/zdata.h
parent966edfb0a3dc2adf5aab461c298fa0feb02f49d6 (diff)
downloadlinux-stable-622ceaddb7649ca328832f50ba1400af778d75fa.tar.gz
linux-stable-622ceaddb7649ca328832f50ba1400af778d75fa.tar.bz2
linux-stable-622ceaddb7649ca328832f50ba1400af778d75fa.zip
erofs: lzma compression support
Add MicroLZMA support in order to maximize compression ratios for specific scenarios. For example, it's useful for low-end embedded boards and as a secondary algorithm in a file for specific access patterns. MicroLZMA is a new container format for raw LZMA1, which was created by Lasse Collin aiming to minimize old LZMA headers and get rid of unnecessary EOPM (end of payload marker) as well as to enable fixed-sized output compression, especially for 4KiB pclusters. Similar to LZ4, inplace I/O approach is used to minimize runtime memory footprint when dealing with I/O. Overlapped decompression is handled with 1) bounced buffer for data under processing or 2) extra short-lived pages from the on-stack pagepool which will be shared in the same read request (128KiB for example). Link: https://lore.kernel.org/r/20211010213145.17462-8-xiang@kernel.org Acked-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Diffstat (limited to 'fs/erofs/zdata.h')
-rw-r--r--fs/erofs/zdata.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/erofs/zdata.h b/fs/erofs/zdata.h
index 3a008f1b9f78..879df5362777 100644
--- a/fs/erofs/zdata.h
+++ b/fs/erofs/zdata.h
@@ -94,13 +94,6 @@ struct z_erofs_decompressqueue {
} u;
};
-#define MNGD_MAPPING(sbi) ((sbi)->managed_cache->i_mapping)
-static inline bool erofs_page_is_managed(const struct erofs_sb_info *sbi,
- struct page *page)
-{
- return page->mapping == MNGD_MAPPING(sbi);
-}
-
#define Z_EROFS_ONLINEPAGE_COUNT_BITS 2
#define Z_EROFS_ONLINEPAGE_COUNT_MASK ((1 << Z_EROFS_ONLINEPAGE_COUNT_BITS) - 1)
#define Z_EROFS_ONLINEPAGE_INDEX_SHIFT (Z_EROFS_ONLINEPAGE_COUNT_BITS)