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 <axboe@kernel.dk>
}
if (ddir_sync(ddir)) {
+ if (io_u->error)
+ goto error;
td->last_was_sync = true;
if (f) {
f->first_write = -1ULL;
icd->error = ret;
}
} else if (io_u->error) {
+error:
icd->error = io_u->error;
io_u_log_error(td, io_u);
}