X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=options.c;h=447f231e71485268d7c6bcc5149edf5800e60aaa;hp=98187def98fbe842e90ae6d4a85a9fb3f358fd10;hb=36833fb04b5f9a734e96a571dfb52fc54b5b95e7;hpb=9a0ac6c7b69355ea095f06c6b0a08115c946dd61 diff --git a/options.c b/options.c index 98187def..447f231e 100644 --- a/options.c +++ b/options.c @@ -493,6 +493,9 @@ int fio_cpus_split(os_cpu_mask_t *mask, unsigned int cpu_index) const long max_cpu = cpus_online(); cpus_in_mask = fio_cpu_count(mask); + if (!cpus_in_mask) + return 0; + cpu_index = cpu_index % cpus_in_mask; index = 0; @@ -1773,6 +1776,11 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .help = "Linux native asynchronous IO", }, #endif +#ifdef ARCH_HAVE_IOURING + { .ival = "io_uring", + .help = "Fast Linux native aio", + }, +#endif #ifdef CONFIG_POSIXAIO { .ival = "posixaio", .help = "POSIX asynchronous IO", @@ -1891,6 +1899,9 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .help = "HTTP (WebDAV/S3) IO engine", }, #endif + { .ival = "nbd", + .help = "Network Block Device (NBD) IO engine" + }, }, }, { @@ -4530,7 +4541,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { { .name = "kb_base", .lname = "KB Base", - .type = FIO_OPT_INT, + .type = FIO_OPT_STR, .off1 = offsetof(struct thread_options, kb_base), .prio = 1, .def = "1024", @@ -4551,7 +4562,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { { .name = "unit_base", .lname = "Unit for quantities of data (Bits or Bytes)", - .type = FIO_OPT_INT, + .type = FIO_OPT_STR, .off1 = offsetof(struct thread_options, unit_base), .prio = 1, .posval = { @@ -4891,8 +4902,7 @@ char *fio_option_dup_subs(const char *opt) return NULL; } - in[OPT_LEN_MAX] = '\0'; - strncpy(in, opt, OPT_LEN_MAX); + snprintf(in, sizeof(in), "%s", opt); while (*inptr && nchr > 0) { if (inptr[0] == '$' && inptr[1] == '{') {