Commit 22ba5e99 authored by Gao Xiang's avatar Gao Xiang

erofs: fix ztailpacking on > 4GiB filesystems

z_idataoff here is an absolute physical offset, so it should use
erofs_off_t (64 bits at least). Otherwise, it'll get trimmed and
cause the decompresion failure.

Link: https://lore.kernel.org/r/20220222033118.20540-1-hsiangkao@linux.alibaba.com
Fixes: ab92184f ("erofs: add on-disk compressed tail-packing inline support")
Reviewed-by: default avatarYue Hu <huyue2@yulong.com>
Reviewed-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarGao Xiang <hsiangkao@linux.alibaba.com>
parent cfb92440
...@@ -325,7 +325,7 @@ struct erofs_inode { ...@@ -325,7 +325,7 @@ struct erofs_inode {
unsigned char z_algorithmtype[2]; unsigned char z_algorithmtype[2];
unsigned char z_logical_clusterbits; unsigned char z_logical_clusterbits;
unsigned long z_tailextent_headlcn; unsigned long z_tailextent_headlcn;
unsigned int z_idataoff; erofs_off_t z_idataoff;
unsigned short z_idata_size; unsigned short z_idata_size;
}; };
#endif /* CONFIG_EROFS_FS_ZIP */ #endif /* CONFIG_EROFS_FS_ZIP */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment