X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=options.c;h=1914037583fb24163936e18aac7b4473aed87728;hb=17dd17648d337479104cbdbe177214ddb69a18ce;hp=6a87e98fda6134f52167667225e69bd5757b296d;hpb=059b080217b86dbf9f3574c4661a1b2300522c79;p=fio.git diff --git a/options.c b/options.c index 6a87e98f..19140375 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; @@ -814,9 +829,6 @@ static int kb_base_verify(struct fio_option *o, void *data) return 0; } -#define __stringify_1(x) #x -#define __stringify(x) __stringify_1(x) - /* * Map of job/command line options */ @@ -961,6 +973,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 @@ -1930,7 +1943,7 @@ static struct fio_option options[FIO_MAX_OPTS] = { .type = FIO_OPT_INT, .off1 = td_var_offset(hugepage_size), .help = "When using hugepages, specify size of each page", - .def = __stringify(FIO_HUGE_PAGE), + .def = __fio_stringify(FIO_HUGE_PAGE), }, { .name = "group_reporting", @@ -1950,6 +1963,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,