X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=io_u.c;h=276f3b0cd2ddf41c3a007e7a4e3aa74255a2a42a;hp=34ab58a11ddc83066d410cc6db71fe7ff8bcff8a;hb=f2bba1820a567ac00b09916239ac8feb125cead2;hpb=9896178e0969cacb521e004e59c580eab63f35f3 diff --git a/io_u.c b/io_u.c index 34ab58a1..276f3b0c 100644 --- a/io_u.c +++ b/io_u.c @@ -412,6 +412,12 @@ void put_io_u(struct thread_data *td, struct io_u *io_u) td->cur_depth--; } +void clear_io_u(struct thread_data *td, struct io_u *io_u) +{ + io_u->flags &= ~IO_U_F_FLIGHT; + put_io_u(td, io_u); +} + void requeue_io_u(struct thread_data *td, struct io_u **io_u) { struct io_u *__io_u = *io_u; @@ -994,6 +1000,17 @@ static void io_completed(struct thread_data *td, struct io_u *io_u, icd->error = io_u->error; io_u_log_error(td, io_u); } + if (td->o.continue_on_error && icd->error && + td_non_fatal_error(icd->error)) { + /* + * If there is a non_fatal error, then add to the error count + * and clear all the errors. + */ + update_error_count(td, icd->error); + td_clear_error(td); + icd->error = 0; + io_u->error = 0; + } } static void init_icd(struct thread_data *td, struct io_completion_data *icd,