X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=options.c;h=5252477b6e0756888d6cc3bd42b8dcdc5b492e4b;hb=9d9eb2e7872c99154094f7750d4c978f075b0144;hp=6f7c41ed1d3df25a07b0f08c932220f752ca553f;hpb=675012f04dbd821cc5d22ec56930094b9c8a99e5;p=fio.git diff --git a/options.c b/options.c index 6f7c41ed..5252477b 100644 --- a/options.c +++ b/options.c @@ -226,6 +226,21 @@ static int str_rw_cb(void *data, const char *str) return 0; } +#ifdef FIO_HAVE_LIBAIO +static int str_libaio_cb(void *data, const char *str) +{ + struct thread_data *td = data; + + if (!strcmp(str, "userspace_reap")) { + td->o.userspace_libaio_reap = 1; + return 0; + } + + log_err("fio: bad libaio sub-option: %s\n", str); + return 1; +} +#endif + static int str_mem_cb(void *data, const char *mem) { struct thread_data *td = data; @@ -961,6 +976,7 @@ static struct fio_option options[FIO_MAX_OPTS] = { #ifdef FIO_HAVE_LIBAIO { .ival = "libaio", .help = "Linux native asynchronous IO", + .cb = str_libaio_cb, }, #endif #ifdef FIO_HAVE_POSIXAIO @@ -1950,6 +1966,13 @@ static struct fio_option options[FIO_MAX_OPTS] = { .off1 = td_var_offset(refill_buffers), .help = "Refill IO buffers on every IO submit", }, + { + .name = "scramble_buffers", + .type = FIO_OPT_BOOL, + .off1 = td_var_offset(scramble_buffers), + .help = "Slightly scramble buffers on every IO submit", + .def = "1", + }, { .name = "clat_percentiles", .type = FIO_OPT_BOOL, @@ -2069,15 +2092,6 @@ static struct fio_option options[FIO_MAX_OPTS] = { .off1 = td_var_offset(gid), .help = "Run job with this group ID", }, -#ifdef FIO_HAVE_LIBAIO - { - .name = "userspace_libaio_reap", - .type = FIO_OPT_BOOL, - .off1 = td_var_offset(userspace_libaio_reap), - .help = "When using the libaio engine with iodepth_batch_complete=0, enable userspace reaping", - .def = "0", - }, -#endif { .name = NULL, },