+ 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;
+ io_u_clear(td, io_u, IO_U_F_FLIGHT);
+ }
+
+ /*
+ * If an error was seen and the io engine didn't propagate it
+ * back to 'td', do so.
+ */
+ if (io_u->error && !td->error)
+ td_verror(td, io_u->error, "td_io_queue");
+
+ /*
+ * Add warning for O_DIRECT so that users have an easier time
+ * spotting potentially bad alignment. If this triggers for the first
+ * IO, then it's likely an alignment problem or because the host fs
+ * does not support O_DIRECT
+ */
+ if (io_u->error == EINVAL && td->io_issues[io_u->ddir & 1] == 1 &&
+ td->o.odirect) {
+
+ log_info("fio: first direct IO errored. File system may not "
+ "support direct IO, or iomem_align= is bad. Try "
+ "setting direct=0.\n");
+ }
+
+ if (!td->io_ops->commit || io_u->ddir == DDIR_TRIM) {
+ io_u_mark_submit(td, 1);
+ io_u_mark_complete(td, 1);
+ }