[PATCH v1 1/2] Remove hardcoded block size shifts
Kelvin Zhang
zhangkelvin at google.com
Wed May 31 06:24:12 AEST 2023
This improves support for non 4K block sizes
Signed-off-by: Kelvin Zhang <zhangkelvin at google.com>
---
lib/compress.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)
--
2.41.0.rc0.172.g3f132b7071-goog
More information about the Linux-erofs
mailing list