#include <assert.h>
#include "flist.h"
#include "fio.h"
+#include "verify.h"
static const char iolog_ver2[] = "fio version 2 iolog";
void log_io_u(struct thread_data *td, struct io_u *io_u)
{
- const char *act[] = { "read", "write", "sync" };
+ const char *act[] = { "read", "write", "sync", "datasync" };
assert(io_u->ddir < 3);
rw = DDIR_WRITE;
else if (!strcmp(act, "sync"))
rw = DDIR_SYNC;
+ else if (!strcmp(act, "datasync"))
+ rw = DDIR_DATASYNC;
else {
log_err("fio: bad iolog file action: %s\n",
act);
if (read_only)
continue;
writes++;
- } else if (rw != DDIR_SYNC && rw != DDIR_INVAL) {
+ } else if (!ddir_sync(rw)) {
log_err("bad ddir: %d\n", rw);
continue;
}
{
int ret = 0;
- if (td->io_ops->flags & FIO_DISKLESSIO)
- return 0;
-
if (td->o.read_iolog_file) {
/*
* Check if it's a blktrace file and load that if possible.
}
for (i = 0; i < log->nr_samples; i++) {
- fprintf(f, "%lu, %lu, %u\n", log->log[i].time, log->log[i].val,
- log->log[i].ddir);
+ fprintf(f, "%lu, %lu, %u, %u\n", log->log[i].time,
+ log->log[i].val,
+ log->log[i].ddir,
+ log->log[i].bs);
}
fclose(f);