Skip to content

fsck.erofs: implement multi-threaded extraction

Nithurshen linux-erofs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2fsck.erofs: add multi-threaded decompressionfsck/main.c include/erofs/cond.h include/erofs/internal.h +2 more+277 -1437 replies
2/2fsck.erofs: implement concurrent directory traversalfsck/main.c+211 -8912 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] fsck.erofs: implement multi-threaded extraction

Hi Xiang,

This series introduces multi-threaded decompression and extraction to fsck.erofs.

The architecture is divided into two decoupled workqueues to prevent thread pool exhaustion gridlock:

1. erofs_traverse_wq: Handles the asynchronous directory walk. It localizes the historically global extract_path and dirstack states into individual payloads, safely traversing the tree and verifying inodes.
2. erofs_wq: Dedicated strictly to processing z_erofs_decompress_req payloads. Decompression tasks take strict ownership of the raw and output buffers, preventing data races.

Testing on heavily packed LZ4HC images demonstrates smooth asynchronous fan-out, successfully overlapping I/O traversal with decompression compute.

Nithurshen (2):
fsck.erofs: add multi-threaded decompression fsck.erofs: implement concurrent directory traversal

 fsck/main.c              | 450 ++++++++++++++++++++++++---------------
 include/erofs/cond.h     |  31 +++
 include/erofs/internal.h |  20 +-
 include/erofs/lock.h     |   3 +
 lib/data.c               | 216 ++++++++++++++-----
 5 files changed, 488 insertions(+), 232 deletions(-)
 create mode 100644 include/erofs/cond.h
Signature · 1 line
2.52.0