Skip to content

Commit

Permalink
io_ur: make sure that sync errors are noticed upfront
Browse files Browse the repository at this point in the history
This could probably be cleaner in the error handling, but jump to
the normal error handling case for ddir_sync() as well.

Fixes: #1577
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
axboe committed May 20, 2023
1 parent c99367f commit 870ea00
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions io_u.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 870ea00

Please sign in to comment.