A bunch of fixes
Really should have been split up, but...
- Check this_io_bytes at the bottom of do_io() so that async engines
have a chance to queue pending IO before deeming this job done.
- dprint() should use log_info(), may not be stdout we want.
- last block bug in get_next_free_block(), if max blocks wasn't a
multiple of the bitmap size.
- Add more debug points.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/ioengines.c b/ioengines.c
index c0e30c9..77c45f7 100644
--- a/ioengines.c
+++ b/ioengines.c
@@ -163,24 +163,17 @@
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;
}