X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=ioengines.c;h=979ac28322fdff473b31dbda5a3240cced718324;hb=982016d689dc7fedbb09646ba0df7e72a781b164;hp=c0e30c9bbd90f21d574132becc7901504e3e337b;hpb=ee56ad500f6692381e131cc37299d23fa910a24a;p=fio.git diff --git a/ioengines.c b/ioengines.c index c0e30c9b..979ac283 100644 --- a/ioengines.c +++ b/ioengines.c @@ -163,24 +163,17 @@ void close_ioengine(struct thread_data *td) td->io_ops = NULL; } -static void dprint_io_u(struct io_u *io_u, const char *p) -{ - struct fio_file *f = io_u->file; - - dprint(FD_IO, "%s: off=%llu/len=%lu/ddir=%d", p, io_u->offset, - io_u->buflen, io_u->ddir); - if (f) - dprint(FD_IO, "/%s", f->file_name); - dprint(FD_IO, "\n"); -} - int td_io_prep(struct thread_data *td, struct io_u *io_u) { dprint_io_u(io_u, "prep"); fio_ro_check(td, io_u); - if (td->io_ops->prep) - return td->io_ops->prep(td, io_u); + if (td->io_ops->prep) { + int ret = td->io_ops->prep(td, io_u); + + dprint(FD_IO, "->prep(%p)=%d\n", io_u, ret); + return ret; + } return 0; } @@ -233,10 +226,11 @@ int td_io_queue(struct thread_data *td, struct io_u *io_u) if (io_u->ddir != DDIR_SYNC) td->io_issues[io_u->ddir]++; - io_u_mark_depth(td, io_u); - ret = td->io_ops->queue(td, io_u); + if (ret != FIO_Q_BUSY) + io_u_mark_depth(td, io_u); + if (ret == FIO_Q_QUEUED) { int r;