diff options
author | Phillip Lougher <phillip@squashfs.org.uk> | 2011-10-22 02:34:48 +0200 |
---|---|---|
committer | Phillip Lougher <phillip@squashfs.org.uk> | 2011-11-02 18:25:50 +0100 |
commit | 7657cacf478940b995c2c73fdff981c13cc62c5c (patch) | |
tree | b25b27a5ba475ebc3923657dcc14ee958d244493 /fs/squashfs/squashfs_fs.h | |
parent | Linux 3.1 (diff) | |
download | linux-7657cacf478940b995c2c73fdff981c13cc62c5c.tar.xz linux-7657cacf478940b995c2c73fdff981c13cc62c5c.zip |
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>
Diffstat (limited to 'fs/squashfs/squashfs_fs.h')
-rw-r--r-- | fs/squashfs/squashfs_fs.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/squashfs/squashfs_fs.h b/fs/squashfs/squashfs_fs.h index b4a4e539a08c..e8e14645de9a 100644 --- a/fs/squashfs/squashfs_fs.h +++ b/fs/squashfs/squashfs_fs.h @@ -36,6 +36,13 @@ #define SQUASHFS_FILE_SIZE 131072 #define SQUASHFS_FILE_LOG 17 +/* default size of block device I/O */ +#ifdef CONFIG_SQUASHFS_4K_DEVBLK_SIZE +#define SQUASHFS_DEVBLK_SIZE 4096 +#else +#define SQUASHFS_DEVBLK_SIZE 1024 +#endif + #define SQUASHFS_FILE_MAX_SIZE 1048576 #define SQUASHFS_FILE_MAX_LOG 20 |