Loading fs/squashfs/Kconfig +22 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,28 @@ config SQUASHFS_XZ If unsure, say N. config SQUASHFS_4K_DEVBLK_SIZE bool "Use 4K device block size?" depends on SQUASHFS help By default Squashfs sets the dev 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. Setting this option will force Squashfs to use a 4K device block size by default. If unsure, say N. config SQUASHFS_EMBEDDED bool "Additional option for memory-constrained systems" depends on SQUASHFS Loading fs/squashfs/squashfs_fs.h +7 −0 Original line number Diff line number Diff line Loading @@ -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 Loading fs/squashfs/super.c +1 −1 Original line number Diff line number Diff line Loading @@ -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); Loading Loading
fs/squashfs/Kconfig +22 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,28 @@ config SQUASHFS_XZ If unsure, say N. config SQUASHFS_4K_DEVBLK_SIZE bool "Use 4K device block size?" depends on SQUASHFS help By default Squashfs sets the dev 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. Setting this option will force Squashfs to use a 4K device block size by default. If unsure, say N. config SQUASHFS_EMBEDDED bool "Additional option for memory-constrained systems" depends on SQUASHFS Loading
fs/squashfs/squashfs_fs.h +7 −0 Original line number Diff line number Diff line Loading @@ -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 Loading
fs/squashfs/super.c +1 −1 Original line number Diff line number Diff line Loading @@ -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); Loading