[PATCH] erofs-utils: fsck: support interlaced uncompressed pcluster

Yue Hu zbestahu at gmail.com
Wed Dec 21 19:42:44 AEDT 2022


On Wed, 21 Dec 2022 15:49:34 +0800
Gao Xiang <hsiangkao at linux.alibaba.com> wrote:

> On Wed, Dec 21, 2022 at 03:41:30PM +0800, Yue Hu wrote:
> > From: Yue Hu <huyue2 at coolpad.com>
> > 
> > Support uncompressed data layout with on-disk interlaced offset in
> > compression mode for fsck.erofs.
> > 
> > Signed-off-by: Yue Hu <huyue2 at coolpad.com>
> > ---
> >  fsck/main.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/fsck/main.c b/fsck/main.c
> > index 410e756..c2f57bc 100644
> > --- a/fsck/main.c
> > +++ b/fsck/main.c
> > @@ -458,12 +458,16 @@ static int erofs_verify_inode_data(struct erofs_inode *inode, int outfd)
> >  				.in = raw,
> >  				.out = buffer,
> >  				.decodedskip = 0,
> > +				.interlaced_offset = 0,  
> 
> Could we use
> 	.interlace_offset =
> 		map.m_algorithmformat == Z_EROFS_COMPRESSION_INTERLACED ?
> 			rq.interlaced_offset : 0,
> 
> here instead?

Okay, let me send v2 in this way.

> 
> Thanks,
> Gao Xiang
> 
> >  				.inputsize = map.m_plen,
> >  				.decodedlength = map.m_llen,
> >  				.alg = map.m_algorithmformat,
> >  				.partial_decoding = 0
> >  			};
> >  
> > +			if (map.m_algorithmformat == Z_EROFS_COMPRESSION_INTERLACED)
> > +				rq.interlaced_offset = erofs_blkoff(map.m_la);
> > +
> >  			ret = z_erofs_decompress(&rq);
> >  			if (ret < 0) {
> >  				erofs_err("failed to decompress data of m_pa %" PRIu64 ", m_plen %" PRIu64 " @ nid %llu: %s",
> > -- 
> > 2.17.1  



More information about the Linux-erofs mailing list