05 Nov, 2011
1 commit
-
* git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-next:
Squashfs: Add an option to set dev block size to 4K
03 Nov, 2011
1 commit
-
This commit adds an option to set the device block size used to 4K.
By default Squashfs sets the device block size (sb_min_blocksize) to 1K
or the smallest block size supported by the block device (if larger).
This, because blocks are packed together and unaligned in Squashfs,
should reduce latency.This, however, gives poor performance on MTD NAND devices where
the optimal I/O size is 4K (even though the devices can support
smaller block sizes).Using a 4K device block size may also improve overall I/O
performance for some file access patterns (e.g. sequential
accesses of files in filesystem order) on all media.Signed-off-by: Phillip Lougher
02 Nov, 2011
1 commit
-
Replace remaining direct i_nlink updates with a new set_nlink()
updater function.Signed-off-by: Miklos Szeredi
Tested-by: Toshiyuki Okajima
Signed-off-by: Christoph Hellwig
28 Sep, 2011
1 commit
-
There are numerous broken references to Documentation files (in other
Documentation files, in comments, etc.). These broken references are
caused by typo's in the references, and by renames or removals of the
Documentation files. Some broken references are simply odd.Fix these broken references, sometimes by dropping the irrelevant text
they were part of.Signed-off-by: Paul Bolle
Signed-off-by: Jiri Kosina
26 Jul, 2011
1 commit
-
* git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-linus:
Squashfs: Make ZLIB compression support optional
Squashfs: Update documentation for XZ and add squashfs-tools devel tree
22 Jul, 2011
1 commit
-
Squashfs now supports XZ and LZO compression in addition to ZLIB.
As such it no longer makes sense to always include ZLIB support.
In particular embedded systems may only use LZO or XZ compression, and
the ability to exclude ZLIB support will reduce kernel size.Signed-off-by: Phillip Lougher
20 Jul, 2011
2 commits
-
... and simplify the living hell out of callers
Signed-off-by: Al Viro
-
d_splice_alias(NULL, dentry) is equivalent to d_add(dentry, NULL), NULL
so no need for that if (inode) ... in there (or ERR_PTR(0), for that
matter)Signed-off-by: Al Viro
30 May, 2011
1 commit
-
* git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-linus:
Squashfs: Fix sanity check patches on big-endian systems
29 May, 2011
1 commit
-
le64 values should be swapped when accessing on
big-endian systems.Signed-off-by: Phillip Lougher
27 May, 2011
1 commit
-
* git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-linus:
Squashfs: update email address
Squashfs: add extra sanity checks at mount time
Squashfs: add sanity checks to fragment reading at mount time
Squashfs: add sanity checks to lookup table reading at mount time
Squashfs: add sanity checks to id reading at mount time
Squashfs: add sanity checks to xattr reading at mount time
Squashfs: reverse order of filesystem table reading
Squashfs: move table allocation into squashfs_read_table()
26 May, 2011
8 commits
-
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
-
Add some extra sanity checks of the inode and directory structures.
Signed-off-by: Phillip Lougher
-
Fsfuzzer generates corrupted filesystems which throw a warn_on in
kmalloc. One of these is due to a corrupted superblock fragments field.
Fix this by checking that the number of bytes to be read (and allocated)
does not extend into the next filesystem structure.Also add a couple of other sanity checks of the mount-time fragment table
structures.Signed-off-by: Phillip Lougher
-
Fsfuzzer generates corrupted filesystems which throw a warn_on in
kmalloc. One of these is due to a corrupted superblock inodes field.
Fix this by checking that the number of bytes to be read (and allocated)
does not extend into the next filesystem structure.Also add a couple of other sanity checks of the mount-time lookup table
structures.Signed-off-by: Phillip Lougher
-
Fsfuzzer generates corrupted filesystems which throw a warn_on in
kmalloc. One of these is due to a corrupted superblock no_ids field.
Fix this by checking that the number of bytes to be read (and allocated)
does not extend into the next filesystem structure.Also add a couple of other sanity checks of the mount-time id table
structures.Signed-off-by: Phillip Lougher
-
These checks add sanity checking of the mount-time xattr structures.
Signed-off-by: Phillip Lougher
-
Reverse order of table reading from mostly first to last in placement
order, to last to first. This is to enable extra superblock sanity
checks to be added in later patches.Signed-off-by: Phillip Lougher
-
This eliminates a lot of duplicate code.
Signed-off-by: Phillip Lougher
10 May, 2011
1 commit
-
- kenrel -> kernel
- whetehr -> whether
- ttt -> tt
- sss -> ssSigned-off-by: Justin P. Mattock
Signed-off-by: Jiri Kosina
31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi
23 Mar, 2011
1 commit
-
Bugzilla bug 31422 reports occasional "page allocation failure. order:4"
at Squashfs mount time. Fix this by making zlib workspace allocation
use vmalloc rather than kmalloc.Reported-by: Mehmet Giritli
Signed-off-by: Phillip Lougher
16 Mar, 2011
1 commit
-
Handle the rare case where a directory metadata block is uncompressed and
corrupted, leading to a kernel oops in directory scanning (memcpy).
Normally corruption is detected at the decompression stage and dealt with
then, however, this will not happen if:- metadata isn't compressed (users can optionally request no metadata
compression), or
- the compressed metadata block was larger than the original, in which
case the uncompressed version was used, or
- the data was corrupt after decompressionThis patch fixes this by adding some sanity checks against known maximum
values.Signed-off-by: Phillip Lougher
01 Mar, 2011
5 commits
-
Squashfs_get_sb() to squashfs_mount() conversion (commit 152a0836)
results in line over 80 characters.Signed-off-by: Phillip Lougher
-
Signed-off-by: Phillip Lougher
-
Signed-off-by: Phillip Lougher
-
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
-
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
26 Jan, 2011
1 commit
-
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
Reported-by: Jesper Juhl
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
14 Jan, 2011
7 commits
-
Get rid of messy repeated #if(n)def CONFIG_SQUASHFS_LZO code
in decompressor.cSigned-off-by: Phillip Lougher
-
Move squashfs_i() definition out of squashfs.h, this eliminates
the need to #include squashfs_fs_i.h from numerous files.Signed-off-by: Phillip Lougher
-
As pointed out by Geert Uytterhoeven, "default n" is the default,
no reason to specify it.Signed-off-by: Phillip Lougher
-
On file system corruption zlib can return Z_STREAM_OK with
input buffers remaining, which will not be released.Signed-off-by: Phillip Lougher
-
Get rid of unnecessary bytes variable, and remove redundant
initialisation of zlib_err.Signed-off-by: Phillip Lougher
-
Signed-off-by: Phillip Lougher
-
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
07 Jan, 2011
1 commit
-
RCU free the struct inode. This will allow:
- Subsequent store-free path walking patch. The inode must be consulted for
permissions when walking, so an RCU inode reference is a must.
- sb_inode_list_lock to be moved inside i_lock because sb list walkers who want
to take i_lock no longer need to take sb_inode_list_lock to walk the list in
the first place. This will simplify and optimize locking.
- Could remove some nested trylock loops in dcache code
- Could potentially simplify things a bit in VM land. Do not need to take the
page lock to follow page->mapping.The downsides of this is the performance cost of using RCU. In a simple
creat/unlink microbenchmark, performance drops by about 10% due to inability to
reuse cache-hot slab objects. As iterations increase and RCU freeing starts
kicking over, this increases to about 20%.In cases where inode lifetimes are longer (ie. many inodes may be allocated
during the average life span of a single inode), a lot of this cache reuse is
not applicable, so the regression caused by this patch is smaller.The cache-hot regression could largely be avoided by using SLAB_DESTROY_BY_RCU,
however this adds some complexity to list walking and store-free path walking,
so I prefer to implement this at a later date, if it is shown to be a win in
real situations. I haven't found a regression in any non-micro benchmark so I
doubt it will be a problem.Signed-off-by: Nick Piggin
29 Oct, 2010
3 commits
-
* git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-linus:
Squashfs: fix function prototype
Squashfs: fix use of __le64 annotated variable -
... and switch of the obvious get_sb_bdev() users to ->mount()
Signed-off-by: Al Viro
-
The fourth argument should be unsigned. Also add missing include
so that the function prototype is defined in xattr_id.cThis fixes a couple of sparse warnings.
Signed-off-by: Phillip Lougher