erofs: fix ztailpacking on > 4GiB filesystems
PATCH 1/1 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.
--- fs/erofs/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/erofs/internal.h +1 -1
@@ -325,7 +325,7 @@ struct erofs_inode {unsigned char z_algorithmtype[2 ];unsigned char z_logical_clusterbits;unsigned long z_tailextent_headlcn; -unsigned int z_idataoff; +erofs_off_t z_idataoff; unsigned short z_idata_size; };#endif /* CONFIG_EROFS_FS_ZIP */
Signature · 1 line
2.24.4
Quoted 15 lines · On Tue, 22 Feb 2022 11:31:18 +0800 Gao Xiang <[email protected]>…
z_idataoffhere is an absolute physical offset, so it should useerofs_off_t(64 bits at least). Otherwise, it'll get trimmed and cause the decompresion failure.Fixes ab92184ff8f1 ("erofs: add on-disk compressed tail-packing inline support")Signed-off-by Gao Xiang <[email protected]>--- fs/erofs/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/erofs/internal.h +0
-0
fs/erofs/internal.h struct erofs_inode { · line 331
Quoted 8 lines
fs/erofs/internal.h +1
-1@@ -325,7 +325,7 @@ struct erofs_inode {unsigned char z_algorithmtype[2 ];unsigned char z_logical_clusterbits;unsigned long z_tailextent_headlcn; -unsigned int z_idataoff; +erofs_off_t z_idataoff; unsigned short z_idata_size; };#endif /* CONFIG_EROFS_FS_ZIP */
Quoted 6 lines · Gao Xiang
z_idataoffhere is an absolute physical offset, so it should useerofs_off_t(64 bits at least). Otherwise, it'll get trimmed and cause the decompresion failure.Fixes ab92184ff8f1 ("erofs: add on-disk compressed tail-packing inline support")Signed-off-by Gao Xiang <[email protected]>
Thanks,
Quoted 9 lines · Chao Yu
Quoted 6 lines · Gao Xiang
z_idataoffhere is an absolute physical offset, so it should useerofs_off_t(64 bits at least). Otherwise, it'll get trimmed and cause the decompresion failure.Fixes ab92184ff8f1 ("erofs: add on-disk compressed tail-packing inline support")Signed-off-by Gao Xiang <[email protected]>Reviewed-by Chao Yu <[email protected]>
Thanks Chao. Yeah, I will submit it this week..
Thanks,
Gao Xiang
Quoted 2 lines
Thanks,