+enum {
+ FIO_SG_WRITE = 1,
+ FIO_SG_WRITE_VERIFY = 2,
+ FIO_SG_WRITE_SAME = 3
+};
+
+struct sg_options {
+ void *pad;
+ unsigned int readfua;
+ unsigned int writefua;
+ unsigned int write_mode;
+};
+
+static struct fio_option options[] = {
+ {
+ .name = "readfua",
+ .lname = "sg engine read fua flag support",
+ .type = FIO_OPT_BOOL,
+ .off1 = offsetof(struct sg_options, readfua),
+ .help = "Set FUA flag (force unit access) for all Read operations",
+ .def = "0",
+ .category = FIO_OPT_C_ENGINE,
+ .group = FIO_OPT_G_SG,
+ },
+ {
+ .name = "writefua",
+ .lname = "sg engine write fua flag support",
+ .type = FIO_OPT_BOOL,
+ .off1 = offsetof(struct sg_options, writefua),
+ .help = "Set FUA flag (force unit access) for all Write operations",
+ .def = "0",
+ .category = FIO_OPT_C_ENGINE,
+ .group = FIO_OPT_G_SG,
+ },
+ {
+ .name = "sg_write_mode",
+ .lname = "specify sg write mode",
+ .type = FIO_OPT_STR,
+ .off1 = offsetof(struct sg_options, write_mode),
+ .help = "Specify SCSI WRITE mode",
+ .def = "write",
+ .posval = {
+ { .ival = "write",
+ .oval = FIO_SG_WRITE,
+ .help = "Issue standard SCSI WRITE commands",
+ },
+ { .ival = "verify",
+ .oval = FIO_SG_WRITE_VERIFY,
+ .help = "Issue SCSI WRITE AND VERIFY commands",
+ },
+ { .ival = "same",
+ .oval = FIO_SG_WRITE_SAME,
+ .help = "Issue SCSI WRITE SAME commands",
+ },
+ },
+ .category = FIO_OPT_C_ENGINE,
+ .group = FIO_OPT_G_SG,
+ },
+ {
+ .name = NULL,
+ },
+};
+