From: Vincent Fu Date: Wed, 28 May 2025 19:13:03 +0000 (+0000) Subject: ioengines: clear in-flight bit for FIO_Q_BUSY syncs X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=02fe4fb04a141d5e72b641f7a36b3ea1e5a2b147;p=fio.git ioengines: clear in-flight bit for FIO_Q_BUSY syncs If a sync operation is ever requeued after a previous queue attempt returns FIO_Q_BUSY the assertion checking that the IO_U_F_FLIGHT bit is not set will fail because this bit is not cleared when the FIO_Q_BUSY return value is processed. This patch makes sure that we clear IO_U_F_FLIGHT when the queue attempt returns FIO_Q_BUSY for sync operations. The counters that are restored are not defined for sync operations, so we cannot modify them. Signed-off-by: Vincent Fu --- diff --git a/ioengines.c b/ioengines.c index 05d01a0f..9f75e66c 100644 --- a/ioengines.c +++ b/ioengines.c @@ -390,10 +390,12 @@ enum fio_q_status td_io_queue(struct thread_data *td, struct io_u *io_u) unlock_file(td, io_u->file); - if (ret == FIO_Q_BUSY && ddir_rw(ddir)) { - td->io_issues[ddir]--; - td->io_issue_bytes[ddir] -= buflen; - td->rate_io_issue_bytes[ddir] -= buflen; + if (ret == FIO_Q_BUSY) { + if (ddir_rw(ddir)) { + td->io_issues[ddir]--; + td->io_issue_bytes[ddir] -= buflen; + td->rate_io_issue_bytes[ddir] -= buflen; + } io_u_clear(td, io_u, IO_U_F_FLIGHT); }