diff options
author | Gao Xiang <hsiangkao@linux.alibaba.com> | 2021-12-28 06:46:01 +0100 |
---|---|---|
committer | Gao Xiang <hsiangkao@linux.alibaba.com> | 2021-12-28 23:42:07 +0100 |
commit | 10e5f6e482e18dcdee9a9b7ff1a66f4977dd1ec2 (patch) | |
tree | f78a209a88e2660e3e2ac6f49b94ba5ca512eaf6 /fs/erofs/compress.h | |
parent | erofs: tidy up z_erofs_lz4_decompress (diff) | |
download | linux-10e5f6e482e18dcdee9a9b7ff1a66f4977dd1ec2.tar.xz linux-10e5f6e482e18dcdee9a9b7ff1a66f4977dd1ec2.zip |
erofs: introduce z_erofs_fixup_insize
To prepare for the upcoming ztailpacking feature, introduce
z_erofs_fixup_insize() and pageofs_in to wrap up the process
to get the exact compressed size via zero padding.
Link: https://lore.kernel.org/r/20211228054604.114518-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/compress.h')
-rw-r--r-- | fs/erofs/compress.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/erofs/compress.h b/fs/erofs/compress.h index 579406504919..19e6c56a9f47 100644 --- a/fs/erofs/compress.h +++ b/fs/erofs/compress.h @@ -12,7 +12,7 @@ struct z_erofs_decompress_req { struct super_block *sb; struct page **in, **out; - unsigned short pageofs_out; + unsigned short pageofs_in, pageofs_out; unsigned int inputsize, outputsize; /* indicate the algorithm will be used for decompression */ @@ -87,6 +87,8 @@ static inline bool erofs_page_is_managed(const struct erofs_sb_info *sbi, return page->mapping == MNGD_MAPPING(sbi); } +int z_erofs_fixup_insize(struct z_erofs_decompress_req *rq, const char *padbuf, + unsigned int padbufsize); int z_erofs_decompress(struct z_erofs_decompress_req *rq, struct page **pagepool); |