Skip to contentSkip to conversation

squashfs : devblksize set to 4KB intead of BLOCK_SIZE(1KB).

PATCH New Namjae Jeon 1 participant 1 message Sep 18, 2011 SquashFS file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 squashfs : devblksize set to 4KB intead of BLOCK_SIZE(1KB).

If devblksize is set by NAND page size before, I think that it is changed to optimal vaule with increasing physical page size of NAND. So I suggest that devblksize is set to 4KB. it is suitable for physical page size of NAND(onenand, flexonenand etc..) and the minimal compressed size. and user gain improved performance(~%20) and stop reading inefficiently several time by page alignment.

---
 fs/squashfs/squashfs_fs.h |    3 +++
 fs/squashfs/super.c       |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)
fs/squashfs/squashfs_fs.h +3 -0
index b4a4e53..c667921 100644
@@ -32,6 +32,9 @@
 #define SQUASHFS_METADATA_SIZE		8192
 #define SQUASHFS_METADATA_LOG		13
 
+/* size of device blocks */
+#define SQUASHFS_DEVBLK_SIZE		4096
+
 /* default size of data blocks */
 #define SQUASHFS_FILE_SIZE		131072
 #define SQUASHFS_FILE_LOG		17
fs/squashfs/super.c +1 -1
index 7438850..2da1715 100644
@@ -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);
Signature · 1 line
1.7.4.4