On 2023/5/31 04:24, Kelvin Zhang wrote:
This improves support for non 4K block sizes

Signed-off-by: Kelvin Zhang <[email protected]>

Reviewed-by: Gao Xiang <[email protected]>

Thanks,
Gao Xiang

---
  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)

Reply via email to