X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=ioengines.c;h=a8ec79de473bf235424e9fac80996c112a744364;hb=c1e38868c299c2b3baa0f5a9f038bb1c79c09308;hp=fb475e9711d6b7fe9ccd6ba4496c9f7b7d64e85e;hpb=e5f9a813ea5ea001c5612bccb587ebd960b36212;p=fio.git diff --git a/ioengines.c b/ioengines.c index fb475e97..a8ec79de 100644 --- a/ioengines.c +++ b/ioengines.c @@ -9,7 +9,6 @@ * generic io engine that could be used for other projects. * */ -#include #include #include #include @@ -357,7 +356,7 @@ int td_io_queue(struct thread_data *td, struct io_u *io_u) } if (ret == FIO_Q_COMPLETED) { - if (ddir_rw(io_u->ddir)) { + if (ddir_rw(io_u->ddir) || ddir_sync(io_u->ddir)) { io_u_mark_depth(td, 1); td->ts.total_io_u[io_u->ddir]++; } @@ -366,7 +365,7 @@ int td_io_queue(struct thread_data *td, struct io_u *io_u) td->io_u_queued++; - if (ddir_rw(io_u->ddir)) + if (ddir_rw(io_u->ddir) || ddir_sync(io_u->ddir)) td->ts.total_io_u[io_u->ddir]++; if (td->io_u_queued >= td->o.iodepth_batch) { @@ -498,8 +497,8 @@ int td_io_open_file(struct thread_data *td, struct fio_file *f) } if (posix_fadvise(f->fd, f->file_offset, f->io_size, flags) < 0) { - td_verror(td, errno, "fadvise"); - goto err; + if (!fio_did_warn(FIO_WARN_FADVISE)) + log_err("fio: fadvise hint failed\n"); } } #ifdef FIO_HAVE_WRITE_HINT