Skip to content

Draft: Get rid of worker thread

Nir Soffer requested to merge blksum-no-threads-broken into master

Failed attempt to get rid of the worker thread in aio-checksum.c.

This breaks cleanup on errors, leaving qemu-nbd running and temporary directories.

We will have to fix cleanup on errors, either using atexit, or by replacing the code calling FAIL with proper code returning errors, so cleanup code can run after errors.

To fix the job/worker thread, we need to keep an error in the job struct, and make it break the processing loop on errors instead of calling FAIL.

At the end of aio_checksum() we can cleanup up and return the job error.

Fixes: #69

Edited by Nir Soffer

Merge request reports