aboutsummaryrefslogtreecommitdiffstats
path: root/fs/squashfs/xz_wrapper.c
Commit message (Collapse)AuthorAgeFilesLines
* Squashfs: update email addressPhillip Lougher2011-05-261-1/+1
| | | | | | | My existing email address may stop working in a month or two, so update email to one that will continue working. Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
* Squashfs: xz_wrapper doesn't need to include squashfs_fs_i.h anymorePhillip Lougher2011-02-281-1/+0
| | | | Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
* Squashfs: add compression options support to xz decompressorPhillip Lougher2011-02-281-8/+41
| | | | | | | | Pass the dictionary size used to compress datablocks. Using a dictionary size less than the block size saves memory overhead, in many cases without adversely affecting compression ratio. Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
* Squashfs: extend decompressor framework to handle compression optionsPhillip Lougher2011-02-281-2/+3
| | | | | | | | | | | | | | | | Extend decompressor framework to handle compression options stored in the filesystem. These options can be used by the relevant decompressor at initialisation time to over-ride defaults. The presence of compression options in the filesystem is indicated by the COMP_OPT filesystem flag. If present the data is read from the filesystem and passed to the decompressor init function. The decompressor init function signature has been extended to take this data. Also update the init function signature in the glib, lzo and xz decompressor wrappers. Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
* squashfs: fix use of uninitialised variable in zlib & xz decompressorsPhillip Lougher2011-01-261-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix potential use of uninitialised variable caused by recent decompressor code optimisations. In zlib_uncompress (zlib_wrapper.c) we have int zlib_err, zlib_init = 0; ... do { ... if (avail == 0) { offset = 0; put_bh(bh[k++]); continue; } ... zlib_err = zlib_inflate(stream, Z_SYNC_FLUSH); ... } while (zlib_err == Z_OK); If continue is executed (avail == 0) then the while condition will be evaluated testing zlib_err, which is uninitialised first time around the loop. Fix this by getting rid of the 'if (avail == 0)' condition test, this edge condition should not be being handled in the decompressor code, and instead handle it generically in the caller code. Similarly for xz_wrapper.c. Incidentally, on most architectures (bar Mips and Parisc), no uninitialised variable warning is generated by gcc, this is because the while condition test on continue is optimised out and not performed (when executing continue zlib_err has not been changed since entering the loop, and logically if the while condition was true previously, then it's still true). Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk> Reported-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Squashfs: add XZ compression supportPhillip Lougher2011-01-131-0/+153
Add support for reading file systems compressed with the XZ compression algorithm. This patch adds the XZ decompressor wrapper code. Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>