engines: Add Network Block Device (NBD) support using libnbd.
[fio.git] / options.c
index 66fb5806c7a41ae7dd24dad5a6372c1222cd06c1..f4c9bedf377fe0805c787f1bf349e5b91ce0b7e2 100644 (file)
--- 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"
+                         },
                },
        },
        {
@@ -2202,14 +2213,6 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
                .category = FIO_OPT_C_IO,
                .group  = FIO_OPT_G_RANDOM,
        },
-       {
-               .name   = "use_os_rand",
-               .lname  = "Use OS random",
-               .type   = FIO_OPT_DEPRECATED,
-               .off1   = offsetof(struct thread_options, dep_use_os_rand),
-               .category = FIO_OPT_C_IO,
-               .group  = FIO_OPT_G_RANDOM,
-       },
        {
                .name   = "norandommap",
                .lname  = "No randommap",
@@ -4538,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",
@@ -4559,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 = {