Re: [PATCH v3 2/4] fs/squashfs: add support for ZSTD decompression

2020-08-18 Thread Joao Marcos Costa
On Tue, 18 Aug 2020 16:35:27 +0200 Thomas Petazzoni wrote: > Hello, > > On Tue, 18 Aug 2020 16:31:16 +0200 > Joao Marcos Costa wrote: > > > +#if IS_ENABLED(CONFIG_ZSTD) > > +static int sqfs_zstd_decompress(void *dest, unsigned long dest_len, > > + void *source, u32 sr

Re: [PATCH v3 2/4] fs/squashfs: add support for ZSTD decompression

2020-08-18 Thread Thomas Petazzoni
Hello, On Tue, 18 Aug 2020 16:31:16 +0200 Joao Marcos Costa wrote: > +#if IS_ENABLED(CONFIG_ZSTD) > +static int sqfs_zstd_decompress(void *dest, unsigned long dest_len, > + void *source, u32 src_len) Pass the squashfs_context structure as argument to the decompressor

[PATCH v3 2/4] fs/squashfs: add support for ZSTD decompression

2020-08-18 Thread Joao Marcos Costa
Add call to ZSTD's ZSTD_decompressDCtx(). In this use case, the caller can upper bound the decompressed size, which will be the SquashFS data block (or metadata block) size, so there is no need to use streaming API. Add ZSTD's worskpace to squashfs_ctxt structure. Signed-off-by: Joao Marcos Costa