[PATCH v3 07/10] erofs-utils: mkfs: support 48-bit block addressing for unencoded inodes

2025-04-09 Thread Gao Xiang
Add an extended option `-E48bit` to indicate 48-bit block addressing is used. Then, 32-byte inodes is preferred since they have per-inode timestamps too. Signed-off-by: Gao Xiang --- lib/blobchunk.c | 31 +++-- lib/inode.c | 88 ++---

Re: [PATCH 1/2] erofs: remove duplicate code

2025-04-09 Thread Gao Xiang
On 2025/4/10 12:20, Bo Liu wrote: Remove duplicate code in function z_erofs_register_pcluster() Signed-off-by: Bo Liu Thanks for catching this, will apply it first: Reviewed-by: Gao Xiang Thanks, Gao Xiang

[PATCH 0/2] erofs: support deflate decompress by using Intel QAT

2025-04-09 Thread Bo Liu
This patch introdueces the use of the Intel QAT to decompress compressed data in the EROFS filesystem, aiming to improve the decompression speed of compressed datea. We created a 285MiB compressed file and then used the following command to create EROFS images with different cluster size. # m

[PATCH 2/2] erofs: support deflate decompress by using Intel QAT

2025-04-09 Thread Bo Liu
This patch introdueces the use of the Intel QAT to decompress compressed data in the EROFS filesystem, aiming to improve the decompression speed of compressed datea. We created a 285MiB compressed file and then used the following command to create EROFS images with different cluster size. # m

[PATCH 1/2] erofs: remove duplicate code

2025-04-09 Thread Bo Liu
Remove duplicate code in function z_erofs_register_pcluster() Signed-off-by: Bo Liu --- fs/erofs/zdata.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index 0671184d9cf1..5c061aaeeb45 100644 --- a/fs/erofs/zdata.c +++ b/fs/erofs/zdata.c @@ -725,7 +725,6 @

Re: [PATCH 1/2] erofs: add __packed annotation to union(__le16..)

2025-04-09 Thread Gao Xiang
Hi David, On 2025/4/10 02:52, David Laight wrote: On Tue, 8 Apr 2025 19:44:47 +0800 Gao Xiang wrote: I'm unsure why they aren't 2 bytes in size only in arm-linux-gnueabi. IIRC one of the arm ABI aligns structures on 32 bit boundaries. Thanks for your reply, but I'm not sure if it's the i

[PATCH 1/2] erofs: add __packed annotation to union(__le16..)

2025-04-09 Thread Gao Xiang
I'm unsure why they aren't 2 bytes in size only in arm-linux-gnueabi. Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202504051202.ds7qiknj-...@intel.com Fixes: 61ba89b57905 ("erofs: add 48-bit block addressing on-disk support") Fixes: efb2aef569b3 ("erofs: add encoded extent on-

Re: [PATCH 1/2] erofs: add __packed annotation to union(__le16..)

2025-04-09 Thread David Laight
On Tue, 8 Apr 2025 19:44:47 +0800 Gao Xiang wrote: > I'm unsure why they aren't 2 bytes in size only in arm-linux-gnueabi. IIRC one of the arm ABI aligns structures on 32 bit boundaries. > > Reported-by: kernel test robot > Closes: https://lore.kernel.org/r/202504051202.ds7qiknj-...@intel.co

[PATCH v2 02/10] erofs-utils: lib: simplify tail inline pcluster handling

2025-04-09 Thread Gao Xiang
Source kernel commit: b7710262d743aca112877d12abed61ce8a5d0d98 Signed-off-by: Gao Xiang --- include/erofs/internal.h | 4 ++-- lib/zmap.c | 20 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/erofs/internal.h b/include/erofs/internal.h

Re: [PATCH] erofs-utils: lib: fix `1UL << vi->u.chunkbits` on 32-bit platforms

2025-04-09 Thread Colin Walters
Patch looks sane to me. On Wed, Apr 9, 2025, at 2:17 AM, Gao Xiang wrote: > I think it should be fixed on the kernel side too, yet I rarely look > after 32-bit platforms due to lack of test environments. It is relatively easy to run 32 bit containers on a 64bit host, that’s what the Debian CI

[PATCH v2 05/10] erofs-utils: lib: sync up with the 48-bit kernel erofs_fs.h

2025-04-09 Thread Gao Xiang
Keep in sync with the related kernel commits: commit 61ba89b57905 ("erofs: add 48-bit block addressing on-disk support") commit efb2aef569b3 ("erofs: add encoded extent on-disk definition") Signed-off-by: Gao Xiang --- include/erofs/internal.h | 4 +- include/erofs_fs.h | 191 +++

[PATCH v2 10/10] erofs-utils: support encoded extents

2025-04-09 Thread Gao Xiang
Use encoded extents if 48bit is set and metadata is smaller for big pclusters. For Zstd and libdeflate, since they don't natively support fixed-size output compression, switch to use fixed-size input compression if `--max-extent-bytes=` is specified and no more than `-C`. Later we will introduce a

[PATCH v2 04/10] erofs-utils: get rid of NULL_ADDR{,_UL}

2025-04-09 Thread Gao Xiang
.. And replace them with EROFS_NULL_ADDR. Signed-off-by: Gao Xiang --- include/erofs/cache.h| 4 ++-- include/erofs/internal.h | 3 --- lib/cache.c | 24 lib/inode.c | 2 +- lib/rebuild.c| 2 +- 5 files changed, 16 insertions

[PATCH v2 08/10] erofs-utils: support dot-omitted directories

2025-04-09 Thread Gao Xiang
Omit the `dot` dirent by default if 48bit layout is set. Signed-off-by: Gao Xiang --- include/erofs/config.h | 1 + include/erofs/internal.h | 1 + lib/dir.c| 2 ++ lib/inode.c | 35 +-- lib/namei.c | 3 ++- mkfs/mai

[PATCH v2 09/10] erofs-utils: lib: implement encoded extent metadata

2025-04-09 Thread Gao Xiang
Source kernel commit: efb2aef569b35b415c232c4e9fdecd0e540e1f60 Source kernel commit: 1d191b4ca51d73699cb127386b95ac152af2b930 Signed-off-by: Gao Xiang --- fsck/main.c | 2 +- include/erofs/internal.h | 3 +- lib/compress.c | 14 +-- lib/zmap.c | 178

[PATCH v2 07/10] erofs-utils: mkfs: support 48-bit block addressing for unencoded inodes

2025-04-09 Thread Gao Xiang
Add an extended option `-E48bit` to indicate 48-bit block addressing is used. Then, 32-byte inodes is preferred since they have per-inode timestamps too. Signed-off-by: Gao Xiang --- lib/blobchunk.c | 28 ++-- lib/inode.c | 88 ++--- m

[PATCH v2 06/10] erofs-utils: implement 48-bit block addressing for unencoded inodes

2025-04-09 Thread Gao Xiang
.. Also port the same kernel logic to erofsfuse and dump.erofs. Signed-off-by: Gao Xiang --- dump/main.c | 1 + include/erofs/internal.h | 21 +++--- include/erofs_fs.h | 2 +- lib/blobchunk.c | 2 +- lib/block_list.c | 8 +-- lib/data.c

[PATCH v2 01/10] erofs-utils: lib: use Z_EROFS_LCLUSTER_TYPE_MAX to simplify switches

2025-04-09 Thread Gao Xiang
Source kernel commit: 3b7781aeaefb627d4e07c1af9be923f9e8047d8b Signed-off-by: Gao Xiang --- lib/zmap.c | 60 ++ 1 file changed, 24 insertions(+), 36 deletions(-) diff --git a/lib/zmap.c b/lib/zmap.c index 2a9baba..30bb7e3 100644 --- a/lib/zmap

[PATCH v2 03/10] erofs-utils: lib: clean up header parsing for ztailpacking and fragments

2025-04-09 Thread Gao Xiang
Source kernel commit: 540787d38b10dbc16a7d2bc2845752ab1605403a Signed-off-by: Gao Xiang --- lib/zmap.c | 22 +++--- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/lib/zmap.c b/lib/zmap.c index d47ed6b..07c6a83 100644 --- a/lib/zmap.c +++ b/lib/zmap.c @@ -493,6 +49

[PATCH] erofs-utils: lib: fix `1UL << vi->u.chunkbits` on 32-bit platforms

2025-04-09 Thread Gao Xiang
`vi->u.chunkbits` could exceed 32, e.g., 43 (12 + 31), which causes the result of 1UL << vi->u.chunkbits to be truncated, returning 2048. Reported-by: Colin Walters Closes: https://lore.kernel.org/r/3bc4c375-9a5b-41cc-a91c-a15fb4b07...@app.fastmail.com Fixes: 401ca0769e20 ("erofs-utils: fuse: su