From 32eb57dd9a19254565a0792ab9b627a3dac319f9 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sat, 4 Mar 2023 21:28:14 +0100 Subject: libsquashfs: remove the default block writer alignment feature The idea of the block align feature was to allow micro-managing that some files are forcefully aligned to 1k/4k ("device block") boundaries, hoping to improve access time at the cost of data density. The feature was not exposed in the tools for a long time and eventuall added to the sort file. Measurement and experimentation showed, that it in fact worsened the read performance on a test system with an old micro SD card as the bottle neck. The feature is removed, and if needed, can be brought back simply by wrapping/sub-classing the default block writer, if need be.. Signed-off-by: David Oberhollenzer --- lib/sqfs/src/block_processor/backend.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/sqfs/src/block_processor/backend.c') diff --git a/lib/sqfs/src/block_processor/backend.c b/lib/sqfs/src/block_processor/backend.c index b443c9d..acff7f5 100644 --- a/lib/sqfs/src/block_processor/backend.c +++ b/lib/sqfs/src/block_processor/backend.c @@ -202,8 +202,7 @@ static int process_completed_fragment(sqfs_block_processor_t *proc, offset = 0; proc->frag_block = frag; proc->frag_block->index = index; - proc->frag_block->flags &= - (SQFS_BLK_DONT_COMPRESS | SQFS_BLK_ALIGN); + proc->frag_block->flags &= SQFS_BLK_DONT_COMPRESS; proc->frag_block->flags |= SQFS_BLK_FRAGMENT_BLOCK; } else { index = proc->frag_block->index; @@ -214,8 +213,7 @@ static int process_completed_fragment(sqfs_block_processor_t *proc, proc->frag_block->size += frag->size; proc->frag_block->flags |= - (frag->flags & - (SQFS_BLK_DONT_COMPRESS | SQFS_BLK_ALIGN)); + (frag->flags & SQFS_BLK_DONT_COMPRESS); } if (proc->frag_tbl != NULL) { -- cgit v1.2.3