erofs-utils: mkfs: implement multi-threaded fragments
authorGao Xiang <hsiangkao@linux.alibaba.com>
Sun, 23 Mar 2025 04:34:51 +0000 (12:34 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Sun, 23 Mar 2025 11:25:37 +0000 (19:25 +0800)
commitb8cc6a36b560d4c7a40538156486c028bb9c85e4
treef61ca0f44f123b9faffc71594a8230555f646967
parent6d360771f9e07c3f6d585551a7b8a1e738c1280b
erofs-utils: mkfs: implement multi-threaded fragments

Currently, only `-Eall-fragments` is allowed for multi-threaded
compression.  However, in many cases, we don't want the entire file
merged into the packed inode, as it may impact runtime performance.

Let's implement multi-threaded compression for `-Efragments` now,
although it's still not very fast and need to optimize performance
even further for this option.

Note that the image sizes could be larger without `-Ededupe` compared
to `-Eall-fragments` since the head parts aren't deduplicated for now.

Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20250323043451.2907228-1-hsiangkao@linux.alibaba.com
lib/compress.c
lib/fragments.c
lib/inode.c