Add support for --fsync and --fdatasync in io_uring_cmd ioengine to
enable FLUSH commands just like libaio or io_uring ioengines.
If --fsync or --fdatasync is given N, FLUSH command will be issued as
per N write commands.
Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
case DDIR_TRIM:
fio_nvme_uring_cmd_trim_prep(cmd, io_u, dsm);
return 0;
+ case DDIR_SYNC:
+ case DDIR_DATASYNC:
+ cmd->opcode = nvme_cmd_flush;
+ cmd->nsid = data->nsid;
+ return 0;
default:
return -ENOTSUP;
}
};
enum nvme_io_opcode {
+ nvme_cmd_flush = 0x00,
nvme_cmd_write = 0x01,
nvme_cmd_read = 0x02,
nvme_cmd_write_uncor = 0x04,