[PATCH v3 1/5] erofs: tidy up z_erofs_lz4_decompress
Chao Yu
chao at kernel.org
Mon Dec 27 13:08:54 AEDT 2021
On 2021/12/25 15:06, Gao Xiang wrote:
> To prepare for the upcoming ztailpacking feature and further
> cleanups, introduce a unique z_erofs_lz4_decompress_ctx to keep
> the context, including inpages, outpages and oend, which are
> frequently used by the lz4 decompressor.
>
> No logic changes.
>
> Signed-off-by: Gao Xiang <hsiangkao at linux.alibaba.com>
> ---
> fs/erofs/decompressor.c | 80 +++++++++++++++++++++--------------------
> 1 file changed, 41 insertions(+), 39 deletions(-)
>
> diff --git a/fs/erofs/decompressor.c b/fs/erofs/decompressor.c
> index c373a199c407..d1282a8b709e 100644
> --- a/fs/erofs/decompressor.c
> +++ b/fs/erofs/decompressor.c
> @@ -16,6 +16,11 @@
> #define LZ4_DECOMPRESS_INPLACE_MARGIN(srcsize) (((srcsize) >> 8) + 32)
> #endif
>
> +struct z_erofs_lz4_decompress_ctx {
> + struct z_erofs_decompress_req *rq;
> + unsigned int inpages, outpages, oend;
> +};
> +
Could you please comment a bit about fields of structure
z_erofs_lz4_decompress_ctx?
Otherwise, the patch looks good to me.
Reviewed-by: Chao Yu <chao at kernel.org>
Thanks,
More information about the Linux-erofs
mailing list