From: Jens Axboe Date: Sat, 20 May 2023 01:30:38 +0000 (-0600) Subject: io_ur: make sure that sync errors are noticed upfront X-Git-Tag: fio-3.35~2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=870ea00243b1290541334bec2a56428c9f68dba6;p=fio.git io_ur: make sure that sync errors are noticed upfront This could probably be cleaner in the error handling, but jump to the normal error handling case for ddir_sync() as well. Fixes: https://github.com/axboe/fio/issues/1577 Signed-off-by: Jens Axboe --- diff --git a/io_u.c b/io_u.c index 30265cfb..6f5fc94d 100644 --- a/io_u.c +++ b/io_u.c @@ -2027,6 +2027,8 @@ static void io_completed(struct thread_data *td, struct io_u **io_u_ptr, } if (ddir_sync(ddir)) { + if (io_u->error) + goto error; td->last_was_sync = true; if (f) { f->first_write = -1ULL; @@ -2082,6 +2084,7 @@ static void io_completed(struct thread_data *td, struct io_u **io_u_ptr, icd->error = ret; } } else if (io_u->error) { +error: icd->error = io_u->error; io_u_log_error(td, io_u); }