Re: [PATCH v3 2/3] erofs: introduce the secondary compression head

Gao Xiang
2021-10-17T15:32:30Z

Hi Chao,

On Sun, Oct 17, 2021 at 11:27:54PM +0800, Chao Yu wrote:
> On 2021/10/10 2:12, Gao Xiang wrote:
> > From: Gao Xiang <hsiangkao@linux.alibaba.com>
> >
> > Previously, for each HEAD lcluster, it can be either HEAD or PLAIN
> > lcluster to indicate whether the whole pcluster is compressed or not.
> >
> > In this patch, a new HEAD2 head type is introduced to specify another
> > compression algorithm other than the primary algorithm for each
> > compressed file, which can be used for upcoming LZMA compression and
> > LZ4 range dictionary compression for various data patterns.
> >
> > It has been stayed in the EROFS roadmap for years. Complete it now!
> >
> > Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
> > ---
> > v2: https://lore.kernel.org/r/20211008200839.24541-3-xiang@kernel.org
> > changes since v2:
> > - simplify z_algorithmtype check suggested by Yue.
> >
> > fs/erofs/erofs_fs.h | 8 +++++---
> > fs/erofs/zmap.c | 38 ++++++++++++++++++++++++++------------
> > 2 files changed, 31 insertions(+), 15 deletions(-)
> >
> > diff --git a/fs/erofs/erofs_fs.h b/fs/erofs/erofs_fs.h
> > index b0b23f41abc3..f579c8c78fff 100644
> > --- a/fs/erofs/erofs_fs.h
> > +++ b/fs/erofs/erofs_fs.h
> > @@ -21,11 +21,13 @@
> > #define EROFS_FEATURE_INCOMPAT_COMPR_CFGS 0x00000002
> > #define EROFS_FEATURE_INCOMPAT_BIG_PCLUSTER 0x00000002
> > #define EROFS_FEATURE_INCOMPAT_CHUNKED_FILE 0x00000004
> > +#define EROFS_FEATURE_INCOMPAT_COMPR_HEAD2 0x00000008
> > #define EROFS_ALL_FEATURE_INCOMPAT \
> > (EROFS_FEATURE_INCOMPAT_LZ4_0PADDING | \
> > EROFS_FEATURE_INCOMPAT_COMPR_CFGS | \
> > EROFS_FEATURE_INCOMPAT_BIG_PCLUSTER | \
> > - EROFS_FEATURE_INCOMPAT_CHUNKED_FILE)
> > + EROFS_FEATURE_INCOMPAT_CHUNKED_FILE | \
> > + EROFS_FEATURE_INCOMPAT_COMPR_HEAD2)
> > #define EROFS_SB_EXTSLOT_SIZE 16
> > @@ -314,9 +316,9 @@ struct z_erofs_map_header {
> > */
> > enum {
> > Z_EROFS_VLE_CLUSTER_TYPE_PLAIN = 0,
> > - Z_EROFS_VLE_CLUSTER_TYPE_HEAD = 1,
> > + Z_EROFS_VLE_CLUSTER_TYPE_HEAD1 = 1,
> > Z_EROFS_VLE_CLUSTER_TYPE_NONHEAD = 2,
> > - Z_EROFS_VLE_CLUSTER_TYPE_RESERVED = 3,
> > + Z_EROFS_VLE_CLUSTER_TYPE_HEAD2 = 3,
>
> It needs to update comments above as well.

okay, let me revise them now.

Thanks,
Gao XIang

>
> Thanks,