Squashfs: Add an option to set dev block size to 4K
authorPhillip Lougher <phillip@squashfs.org.uk>
Sat, 22 Oct 2011 00:34:48 +0000 (01:34 +0100)
committerPhillip Lougher <phillip@squashfs.org.uk>
Wed, 2 Nov 2011 17:25:50 +0000 (17:25 +0000)
commit7657cacf478940b995c2c73fdff981c13cc62c5c
treeb25b27a5ba475ebc3923657dcc14ee958d244493
parentc3b92c8787367a8bb53d57d9789b558f1295cc96
Squashfs: Add an option to set dev block size to 4K

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 <phillip@squashfs.org.uk>
fs/squashfs/Kconfig
fs/squashfs/squashfs_fs.h
fs/squashfs/super.c