diff options
author | Kelvin Zhang <zhangkelvin@google.com> | 2023-05-30 13:24:12 -0700 |
---|---|---|
committer | Gao Xiang <hsiangkao@linux.alibaba.com> | 2023-05-31 08:50:29 +0800 |
commit | 53532604cd42a09f3dc25d3ced825b12d6084ac0 (patch) | |
tree | 4cfabfe0f8ba7d7e14cc18fcbb78df65085ebea1 | |
parent | a25129f4c004e6bf00e8ef2d12f5a73faf527e92 (diff) | |
download | erofs-utils-53532604cd42a09f3dc25d3ced825b12d6084ac0.tar.gz |
erofs-utils: remove hardcoded block size shifts
This improves support for non 4K block sizes
Signed-off-by: Kelvin Zhang <zhangkelvin@google.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230530202413.2734743-1-zhangkelvin@google.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
-rw-r--r-- | lib/compress.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/compress.c b/lib/compress.c index 06bacdb..ae0838c 100644 --- a/lib/compress.c +++ b/lib/compress.c @@ -766,7 +766,7 @@ static void z_erofs_write_mapheader(struct erofs_inode *inode, .h_algorithmtype = inode->z_algorithmtype[1] << 4 | inode->z_algorithmtype[0], /* lclustersize */ - .h_clusterbits = inode->z_logical_clusterbits - 12, + .h_clusterbits = inode->z_logical_clusterbits - sbi.blkszbits, }; if (inode->z_advise & Z_EROFS_ADVISE_FRAGMENT_PCLUSTER) |