[PATCH v1] erofs-utils: don't hard code constants
Gao Xiang
hsiangkao at linux.alibaba.com
Tue Feb 1 13:51:02 AEDT 2022
On Mon, Jan 31, 2022 at 10:43:27AM -0800, Kelvin Zhang wrote:
> Use sizeof(z_erofs_vle_decompressed_index) to compute legacy index count
>
> Test: th
> 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 98be7a2..c520a1e 100644
> --- a/lib/compress.c
> +++ b/lib/compress.c
> @@ -359,7 +359,7 @@ int z_erofs_convert_to_compacted_format(struct erofs_inode *inode,
> inode->xattr_isize) +
> sizeof(struct z_erofs_map_header);
> const unsigned int totalidx = (legacymetasize -
> - Z_EROFS_LEGACY_MAP_HEADER_SIZE) / 8;
> + Z_EROFS_LEGACY_MAP_HEADER_SIZE) / sizeof(struct z_erofs_vle_decompressed_index);
It would be better to keep 80-char limit rule.
Thanks, applied.
Happy chinese new year!
Gao Xiang
> const unsigned int logical_clusterbits = inode->z_logical_clusterbits;
> u8 *out, *in;
> struct z_erofs_compressindex_vec cv[16];
> --
> 2.35.0.rc2.247.g8bbb082509-goog
More information about the Linux-erofs
mailing list