Merge branch 'dev' of https://github.com/smartxworks/fio
[fio.git] / optgroup.c
index 5f9ca961f93f7c6af0600e568481b2bee01b6015..04ceec7ec3a7242db72bbb07349c3cbeb6695671 100644 (file)
@@ -1,6 +1,7 @@
 #include <stdio.h>
 #include <inttypes.h>
 #include "optgroup.h"
+#include "compiler/compiler.h"
 
 /*
  * Option grouping
@@ -30,16 +31,16 @@ static const struct opt_group fio_opt_groups[] = {
                .name   = "Profiles",
                .mask   = FIO_OPT_C_PROFILE,
        },
+       {
+               .name   = "I/O engines",
+               .mask   = FIO_OPT_C_ENGINE,
+       },
        {
                .name   = NULL,
        },
 };
 
 static const struct opt_group fio_opt_cat_groups[] = {
-       {
-               .name   = "Latency profiling",
-               .mask   = FIO_OPT_G_LATPROF,
-       },
        {
                .name   = "Rate",
                .mask   = FIO_OPT_G_RATE,
@@ -125,13 +126,52 @@ static const struct opt_group fio_opt_cat_groups[] = {
                .mask   = FIO_OPT_G_TIOBENCH,
        },
        {
-               .name   = "MTD",
+               .name   = "Error handling",
+               .mask   = FIO_OPT_G_ERR,
+       },
+       {
+               .name   = "Ext4 defrag I/O engine", /* e4defrag */
+               .mask   = FIO_OPT_G_E4DEFRAG,
+       },
+       {
+               .name   = "Network I/O engine", /* net */
+               .mask   = FIO_OPT_G_NETIO,
+       },
+       {
+               .name   = "RDMA I/O engine", /* rdma */
+               .mask   = FIO_OPT_G_RDMA,
+       },
+       {
+               .name   = "libaio I/O engine", /* libaio */
+               .mask   = FIO_OPT_G_LIBAIO,
+       },
+       {
+               .name   = "ACT Aerospike like benchmark profile",
+               .mask   = FIO_OPT_G_ACT,
+       },
+       {
+               .name   = "Latency profiling",
+               .mask   = FIO_OPT_G_LATPROF,
+       },
+       {
+               .name   = "RBD I/O engine", /* rbd */
+               .mask   = FIO_OPT_G_RBD,
+       },
+       {
+               .name   = "GlusterFS I/O engine", /* gfapi,gfapi_async */
+               .mask   = FIO_OPT_G_GFAPI,
+       },
+       {
+               .name   = "MTD I/O engine", /* mtd */
                .mask   = FIO_OPT_G_MTD,
        },
-
+       {
+               .name   = "libhdfs I/O engine", /* libhdfs */
+               .mask   = FIO_OPT_G_HDFS,
+       },
        {
                .name   = NULL,
-       }
+       },
 };
 
 static const struct opt_group *group_from_mask(const struct opt_group *ogs,
@@ -162,5 +202,8 @@ const struct opt_group *opt_group_from_mask(uint64_t *mask)
 
 const struct opt_group *opt_group_cat_from_mask(uint64_t *mask)
 {
+       compiletime_assert(__FIO_OPT_G_NR <= 8 * sizeof(uint64_t),
+                               "__FIO_OPT_G_NR");
+
        return group_from_mask(fio_opt_cat_groups, mask, FIO_OPT_G_INVALID);
 }