From: Naohiro Aota Date: Fri, 28 Feb 2020 07:12:46 +0000 (+0900) Subject: backend: always clean up pending aios X-Git-Tag: fio-3.20~53 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=d300ec278f0c8ff8b60ed62d1701f0b3c92294b3;p=fio.git backend: always clean up pending aios cleanup_pending_aios() is called when a thread exits with error, so all the call site of this function is under "if (td->error)". However, commit d28174f0189c ("workqueue: ensure we see deferred error for IOs"), for some reason, added "if (td->error) return" at the head of this function, making this function practically void. Revert this part to ensure cleaning up pending aios. Besides, cleanup_pending_aios() should not return even when io_u_queued_complete() failed. Because, it keeps in-flight aios left. Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Signed-off-by: Naohiro Aota Signed-off-by: Jens Axboe --- diff --git a/backend.c b/backend.c index 936203dc..feb34e51 100644 --- a/backend.c +++ b/backend.c @@ -237,15 +237,10 @@ static void cleanup_pending_aio(struct thread_data *td) { int r; - if (td->error) - return; - /* * get immediately available events, if any */ r = io_u_queued_complete(td, 0); - if (r < 0) - return; /* * now cancel remaining active events