[PATCH 1/3] erofs-utils: introduce fuse implementation

Gao Xiang hsiangkao at redhat.com
Sun Nov 22 15:58:27 AEDT 2020


On Sun, Nov 22, 2020 at 12:43:31PM +0800, Li GuiFu via Linux-erofs wrote:
> Gao Xiang
> 
> It run good, some codes format need to be adjusted
> Please re-send to make more readable

Thanks for taking time on this, I also think it might be worth
adding some testcase coverage for erofsfuse later. Let me think
more about this.

> 
> On 2020/11/21 1:41, Gao Xiang via Linux-erofs wrote:
> > From: Li Guifu <blucerlee at gmail.com>
> > 
> > Let's add a simple erofsfuse approach, and benefits are:
> > 
> >  - images can be supported on various platforms;
> >  - new unpack tool can be developed based on this;
> >  - new on-disk features can be iterated, verified effectively.
> > 
> > This commit only addresses reading uncompressed regular files.
> > Other file (e.g. compressed file) support is out of scope here.
> > 
> > Note that erofsfuse is an unstable feature for now (also notice
> > LZ4_decompress_safe_partial() was broken in lz4-1.9.2, which
> > just fixed in lz4-1.9.3), let's disable it by default for a while.
> > 
> > Signed-off-by: Li Guifu <blucerlee at gmail.com>
> > Signed-off-by: Huang Jianan <huangjianan at oppo.com>
> > Signed-off-by: Guo Weichao <guoweichao at oppo.com>
> > Signed-off-by: Gao Xiang <hsiangkao at aol.com>
> > ---
> 
> > +
> > +static void signal_handle_sigsegv(int signal)
> > +{
> > +	void *array[10];
> > +	size_t nptrs;
> > +	char **strings;
> > +	size_t i;
> > +
> > +	erofs_dump("========================================\n");
> > +	erofs_dump("Segmentation Fault.  Starting backtrace:\n");
> > +	nptrs = backtrace(array, 10);
> > +	strings = backtrace_symbols(array, nptrs);
> > +	if (strings) {
> > +		for (i = 0; i < nptrs; i++)
> > +			erofs_dbg("%s", strings[i]);
> 
> erofs_dbg change to erofs_dump to make all log printed, "\n" is needed

Will fix.

> 
> > +		free(strings);
> > +	}
> > +	erofs_dump("========================================\n");
> > +	abort();
> > +}
> > +
> > +
> 
> >  
> > +static inline unsigned int erofs_bitrange(unsigned int value, unsigned int bit,
> > +					  unsigned int bits)
> > +{
> > +

> empty line is not needed

Ah, will fix. which was copied from the kernel side, these two empty
lines can be deleted for sure (If you are interested in it, could you
also take a look at cleaning up _all_ reduntant extra line on the on
the kernel side as well, it's minor though.)

> 
> > +	return (value >> bit) & ((1 << bits) - 1);
> > +}
> > +
> > +
> empty line is not needed

ditto.

Thanks,
Gao Xiang



More information about the Linux-erofs mailing list