aboutsummaryrefslogtreecommitdiffstats
path: root/fs/squashfs/super.c
diff options
context:
space:
mode:
authorPhillip Lougher <phillip@squashfs.org.uk>2011-10-22 01:34:48 +0100
committerPhillip Lougher <phillip@squashfs.org.uk>2011-11-02 17:25:50 +0000
commit7657cacf478940b995c2c73fdff981c13cc62c5c (patch)
treeb25b27a5ba475ebc3923657dcc14ee958d244493 /fs/squashfs/super.c
parentLinux 3.1 (diff)
downloadlinux-dev-7657cacf478940b995c2c73fdff981c13cc62c5c.tar.xz
linux-dev-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/super.c')
-rw-r--r--fs/squashfs/super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/squashfs/super.c b/fs/squashfs/super.c
index 7438850c62d0..2da1715452ac 100644
--- a/fs/squashfs/super.c
+++ b/fs/squashfs/super.c
@@ -95,7 +95,7 @@ static int squashfs_fill_super(struct super_block *sb, void *data, int silent)
}
msblk = sb->s_fs_info;
- msblk->devblksize = sb_min_blocksize(sb, BLOCK_SIZE);
+ msblk->devblksize = sb_min_blocksize(sb, SQUASHFS_DEVBLK_SIZE);
msblk->devblksize_log2 = ffz(~msblk->devblksize);
mutex_init(&msblk->read_data_mutex);