X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=options.c;h=8fa50a8f5d987ebfa73098b0c5a17de5e2969940;hp=8034cd7dad755b58c5f546e64fb083be79ec49a4;hb=62cb17de316e5aa755228fef8ce19b5f5353a3cf;hpb=9c42684e32325da26e862280388798343c5f1305 diff --git a/options.c b/options.c index 8034cd7d..8fa50a8f 100644 --- a/options.c +++ b/options.c @@ -166,7 +166,7 @@ static int bssplit_ddir(struct thread_data *td, int ddir, char *str) static int str_bssplit_cb(void *data, const char *input) { struct thread_data *td = data; - char *str, *p, *odir; + char *str, *p, *odir, *ddir; int ret = 0; p = str = strdup(input); @@ -176,7 +176,21 @@ static int str_bssplit_cb(void *data, const char *input) odir = strchr(str, ','); if (odir) { - ret = bssplit_ddir(td, DDIR_WRITE, odir + 1); + ddir = strchr(odir + 1, ','); + if (ddir) { + ret = bssplit_ddir(td, DDIR_TRIM, ddir + 1); + if (!ret) + *ddir = '\0'; + } else { + char *op; + + op = strdup(odir + 1); + ret = bssplit_ddir(td, DDIR_TRIM, op); + + free(op); + } + if (!ret) + ret = bssplit_ddir(td, DDIR_WRITE, odir + 1); if (!ret) { *odir = '\0'; ret = bssplit_ddir(td, DDIR_READ, str); @@ -185,12 +199,15 @@ static int str_bssplit_cb(void *data, const char *input) char *op; op = strdup(str); + ret = bssplit_ddir(td, DDIR_WRITE, op); + free(op); + if (!ret) { + op = strdup(str); + ret = bssplit_ddir(td, DDIR_TRIM, op); + free(op); + } ret = bssplit_ddir(td, DDIR_READ, str); - if (!ret) - ret = bssplit_ddir(td, DDIR_WRITE, op); - - free(op); } free(p); @@ -932,6 +949,10 @@ static struct fio_option options[FIO_MAX_OPTS] = { .oval = TD_DDIR_WRITE, .help = "Sequential write", }, + { .ival = "trim", + .oval = TD_DDIR_TRIM, + .help = "Sequential trim", + }, { .ival = "randread", .oval = TD_DDIR_RANDREAD, .help = "Random read", @@ -940,10 +961,18 @@ static struct fio_option options[FIO_MAX_OPTS] = { .oval = TD_DDIR_RANDWRITE, .help = "Random write", }, + { .ival = "randtrim", + .oval = TD_DDIR_RANDTRIM, + .help = "Random trim", + }, { .ival = "rw", .oval = TD_DDIR_RW, .help = "Sequential read and write mix", }, + { .ival = "readwrite", + .oval = TD_DDIR_RW, + .help = "Sequential read and write mix", + }, { .ival = "randrw", .oval = TD_DDIR_RANDRW, .help = "Random read and write mix" @@ -1048,6 +1077,11 @@ static struct fio_option options[FIO_MAX_OPTS] = { { .ival = "rdma", .help = "RDMA IO engine", }, +#endif +#ifdef FIO_HAVE_FUSION_AW + { .ival = "fusion-aw-sync", + .help = "Fusion-io atomic write engine", + }, #endif { .ival = "external", .help = "Load external engine (append name)", @@ -1118,12 +1152,21 @@ static struct fio_option options[FIO_MAX_OPTS] = { .help = "Start IO from this offset", .def = "0", }, + { + .name = "offset_increment", + .type = FIO_OPT_STR_VAL, + .off1 = td_var_offset(offset_increment), + .help = "What is the increment from one offset to the next", + .parent = "offset", + .def = "0", + }, { .name = "bs", .alias = "blocksize", .type = FIO_OPT_INT, .off1 = td_var_offset(bs[DDIR_READ]), .off2 = td_var_offset(bs[DDIR_WRITE]), + .off3 = td_var_offset(bs[DDIR_TRIM]), .minval = 1, .help = "Block size unit", .def = "4k", @@ -1135,6 +1178,7 @@ static struct fio_option options[FIO_MAX_OPTS] = { .type = FIO_OPT_INT, .off1 = td_var_offset(ba[DDIR_READ]), .off2 = td_var_offset(ba[DDIR_WRITE]), + .off3 = td_var_offset(ba[DDIR_TRIM]), .minval = 1, .help = "IO block offset alignment", .parent = "rw", @@ -1147,6 +1191,8 @@ static struct fio_option options[FIO_MAX_OPTS] = { .off2 = td_var_offset(max_bs[DDIR_READ]), .off3 = td_var_offset(min_bs[DDIR_WRITE]), .off4 = td_var_offset(max_bs[DDIR_WRITE]), + .off5 = td_var_offset(min_bs[DDIR_TRIM]), + .off6 = td_var_offset(max_bs[DDIR_TRIM]), .minval = 1, .help = "Set block size range (in more detail than bs)", .parent = "rw", @@ -1784,30 +1830,34 @@ static struct fio_option options[FIO_MAX_OPTS] = { { .name = "rate", .type = FIO_OPT_INT, - .off1 = td_var_offset(rate[0]), - .off2 = td_var_offset(rate[1]), + .off1 = td_var_offset(rate[DDIR_READ]), + .off2 = td_var_offset(rate[DDIR_WRITE]), + .off3 = td_var_offset(rate[DDIR_TRIM]), .help = "Set bandwidth rate", }, { .name = "ratemin", .type = FIO_OPT_INT, - .off1 = td_var_offset(ratemin[0]), - .off2 = td_var_offset(ratemin[1]), + .off1 = td_var_offset(ratemin[DDIR_READ]), + .off2 = td_var_offset(ratemin[DDIR_WRITE]), + .off3 = td_var_offset(ratemin[DDIR_TRIM]), .help = "Job must meet this rate or it will be shutdown", .parent = "rate", }, { .name = "rate_iops", .type = FIO_OPT_INT, - .off1 = td_var_offset(rate_iops[0]), - .off2 = td_var_offset(rate_iops[1]), + .off1 = td_var_offset(rate_iops[DDIR_READ]), + .off2 = td_var_offset(rate_iops[DDIR_WRITE]), + .off3 = td_var_offset(rate_iops[DDIR_TRIM]), .help = "Limit IO used to this number of IO operations/sec", }, { .name = "rate_iops_min", .type = FIO_OPT_INT, - .off1 = td_var_offset(rate_iops_min[0]), - .off2 = td_var_offset(rate_iops_min[1]), + .off1 = td_var_offset(rate_iops_min[DDIR_READ]), + .off2 = td_var_offset(rate_iops_min[DDIR_WRITE]), + .off3 = td_var_offset(rate_iops_min[DDIR_TRIM]), .help = "Job must meet this rate or it will be shut down", .parent = "rate_iops", }, @@ -1872,6 +1922,13 @@ static struct fio_option options[FIO_MAX_OPTS] = { .help = "Create files when they are opened for IO", .def = "0", }, + { + .name = "create_only", + .type = FIO_OPT_BOOL, + .off1 = td_var_offset(create_only), + .help = "Only perform file creation phase", + .def = "0", + }, { .name = "pre_read", .type = FIO_OPT_BOOL, @@ -2021,6 +2078,13 @@ static struct fio_option options[FIO_MAX_OPTS] = { .minval = 1, .help = "How compressible the buffer is (approximately)", }, + { + .name = "buffer_compress_chunk", + .type = FIO_OPT_INT, + .off1 = td_var_offset(compress_chunk), + .parent = "buffer_compress_percentage", + .help = "Size of compressible region in buffer", + }, { .name = "clat_percentiles", .type = FIO_OPT_BOOL,