Re: [PATCH] erofs-utils: fix thread join loop in erofs_destroy_workqueue

Nithurshen Karthikeyan
2026-03-17T04:38:27Z

Subject: Re: [PATCH] erofs-utils: fix thread join loop in
erofs_destroy_workqueue

Hi,

I have submitted a patch to fix the thread joining logic within
erofs_destroy_workqueue. To ensure the robustness of the teardown
process and guarantee no resources are leaked, I performed the
following verification and testing:

1) I built mkfs.erofs and successfully compressed a test directory
containing various text files using lz4 compression. The image
build completed successfully without any hangs or crashes.

2) I ran the same mkfs.erofs compression workload through Valgrind
with --leak-check=full and --show-leak-kinds=all. Valgrind
reported that "All heap blocks were freed -- no leaks are
possible," confirming that the modified teardown loop correctly
frees the worker array and other resources.

3) To ensure no orphaned threads or synchronization issues occur
during the destruction phase, I ran the workload through Helgrind.
The workqueue teardown sequence executed cleanly. (Note:
Helgrind did catch a pre-existing benign data race in
compressor_lz4_init unrelated to this patch which I am happy to
send a patch for).

4) Finally, I ran the built-in ./contrib/mkstress.sh script to verify
behavior under heavier loads, which also completed without issues.

Please let me know if you need any additional testing logs or
further modifications to the patch.

Thanks,
Nithurshen