* 'master' of https://github.com/celestinechen/fio:
FIO with fsync option issues more DDIR_SYNC commands than expected
if (ddir_sync(ddir)) {
if (io_u->error)
goto error;
- td->last_was_sync = true;
if (f) {
f->first_write = -1ULL;
f->last_write = -1ULL;
return;
}
- td->last_was_sync = false;
td->last_ddir = ddir;
if (!io_u->error && ddir_rw(ddir)) {
io_u_mark_depth(td, 1);
td->ts.total_io_u[io_u->ddir]++;
}
+
+ td->last_was_sync = ddir_sync(io_u->ddir);
} else if (ret == FIO_Q_QUEUED) {
td->io_u_queued++;
if (td->io_u_queued >= td->o.iodepth_batch)
td_io_commit(td);
+
+ td->last_was_sync = ddir_sync(io_u->ddir);
}
if (!td_ioengine_flagged(td, FIO_SYNCIO) &&