Kill fusion atomic write engine
[fio.git] / options.c
index f5920278ad2cd15c8efa98eb6c50cd155de8f594..6bd745553644283681c095853bca80483671c975 100644 (file)
--- a/options.c
+++ b/options.c
@@ -959,48 +959,6 @@ static int zone_split_ddir(struct thread_options *o, enum fio_ddir ddir,
        return 0;
 }
 
-static void __td_zone_gen_index(struct thread_data *td, enum fio_ddir ddir)
-{
-       unsigned int i, j, sprev, aprev;
-       uint64_t sprev_sz;
-
-       td->zone_state_index[ddir] = malloc(sizeof(struct zone_split_index) * 100);
-
-       sprev_sz = sprev = aprev = 0;
-       for (i = 0; i < td->o.zone_split_nr[ddir]; i++) {
-               struct zone_split *zsp = &td->o.zone_split[ddir][i];
-
-               for (j = aprev; j < aprev + zsp->access_perc; j++) {
-                       struct zone_split_index *zsi = &td->zone_state_index[ddir][j];
-
-                       zsi->size_perc = sprev + zsp->size_perc;
-                       zsi->size_perc_prev = sprev;
-
-                       zsi->size = sprev_sz + zsp->size;
-                       zsi->size_prev = sprev_sz;
-               }
-
-               aprev += zsp->access_perc;
-               sprev += zsp->size_perc;
-               sprev_sz += zsp->size;
-       }
-}
-
-/*
- * Generate state table for indexes, so we don't have to do it inline from
- * the hot IO path
- */
-static void td_zone_gen_index(struct thread_data *td)
-{
-       int i;
-
-       td->zone_state_index = malloc(DDIR_RWDIR_CNT *
-                                       sizeof(struct zone_split_index *));
-
-       for (i = 0; i < DDIR_RWDIR_CNT; i++)
-               __td_zone_gen_index(td, i);
-}
-
 static int parse_zoned_distribution(struct thread_data *td, const char *input,
                                    bool absolute)
 {
@@ -1055,9 +1013,7 @@ static int parse_zoned_distribution(struct thread_data *td, const char *input,
                return ret;
        }
 
-       if (!ret)
-               td_zone_gen_index(td);
-       else {
+       if (ret) {
                for (i = 0; i < DDIR_RWDIR_CNT; i++)
                        td->o.zone_split_nr[i] = 0;
        }
@@ -1284,6 +1240,23 @@ int set_name_idx(char *target, size_t tlen, char *input, int index,
        return len;
 }
 
+char* get_name_by_idx(char *input, int index)
+{
+       unsigned int cur_idx;
+       char *fname, *str, *p;
+
+       p = str = strdup(input);
+
+       index %= get_max_name_idx(input);
+       for (cur_idx = 0; cur_idx <= index; cur_idx++)
+               fname = get_next_name(&str);
+
+       fname = strdup(fname);
+       free(p);
+
+       return fname;
+}
+
 static int str_filename_cb(void *data, const char *input)
 {
        struct thread_data *td = cb_data_to_td(data);
@@ -1855,11 +1828,6 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
                            .help = "RDMA IO engine",
                          },
 #endif
-#ifdef CONFIG_FUSION_AW
-                         { .ival = "fusion-aw-sync",
-                           .help = "Fusion-io atomic write engine",
-                         },
-#endif
 #ifdef CONFIG_LINUX_EXT4_MOVE_EXTENT
                          { .ival = "e4defrag",
                            .help = "ext4 defrag engine",
@@ -1889,6 +1857,17 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
                          },
 
 #endif
+#ifdef CONFIG_IME
+                         { .ival = "ime_psync",
+                           .help = "DDN's IME synchronous IO engine",
+                         },
+                         { .ival = "ime_psyncv",
+                           .help = "DDN's IME synchronous IO engine using iovecs",
+                         },
+                         { .ival = "ime_aio",
+                           .help = "DDN's IME asynchronous IO engine",
+                         },
+#endif
 #ifdef CONFIG_LINUX_DEVDAX
                          { .ival = "dev-dax",
                            .help = "DAX Device based IO engine",
@@ -1906,6 +1885,11 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
                          { .ival = "libpmem",
                            .help = "PMDK libpmem based IO engine",
                          },
+#endif
+#ifdef CONFIG_HTTP
+                         { .ival = "http",
+                           .help = "HTTP (WebDAV/S3) IO engine",
+                         },
 #endif
                },
        },
@@ -3250,6 +3234,30 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
                .help   = "Your platform does not support IO scheduler switching",
        },
 #endif
+       {
+               .name   = "zonemode",
+               .lname  = "Zone mode",
+               .help   = "Mode for the zonesize, zonerange and zoneskip parameters",
+               .type   = FIO_OPT_STR,
+               .off1   = offsetof(struct thread_options, zone_mode),
+               .def    = "none",
+               .category = FIO_OPT_C_IO,
+               .group  = FIO_OPT_G_ZONE,
+               .posval = {
+                          { .ival = "none",
+                            .oval = ZONE_MODE_NONE,
+                            .help = "no zoning",
+                          },
+                          { .ival = "strided",
+                            .oval = ZONE_MODE_STRIDED,
+                            .help = "strided mode - random I/O is restricted to a single zone",
+                          },
+                          { .ival = "zbd",
+                            .oval = ZONE_MODE_ZBD,
+                            .help = "zoned block device mode - random I/O selects one of multiple zones randomly",
+                          },
+               },
+       },
        {
                .name   = "zonesize",
                .lname  = "Zone size",
@@ -3283,6 +3291,52 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
                .category = FIO_OPT_C_IO,
                .group  = FIO_OPT_G_ZONE,
        },
+       {
+               .name   = "read_beyond_wp",
+               .lname  = "Allow reads beyond the zone write pointer",
+               .type   = FIO_OPT_BOOL,
+               .off1   = offsetof(struct thread_options, read_beyond_wp),
+               .help   = "Allow reads beyond the zone write pointer",
+               .def    = "0",
+               .category = FIO_OPT_C_IO,
+               .group  = FIO_OPT_G_INVALID,
+       },
+       {
+               .name   = "max_open_zones",
+               .lname  = "Maximum number of open zones",
+               .type   = FIO_OPT_INT,
+               .off1   = offsetof(struct thread_options, max_open_zones),
+               .maxval = FIO_MAX_OPEN_ZBD_ZONES,
+               .help   = "Limit random writes to SMR drives to the specified"
+                         " number of sequential zones",
+               .def    = "0",
+               .category = FIO_OPT_C_IO,
+               .group  = FIO_OPT_G_INVALID,
+       },
+       {
+               .name   = "zone_reset_threshold",
+               .lname  = "Zone reset threshold",
+               .help   = "Zoned block device reset threshold",
+               .type   = FIO_OPT_FLOAT_LIST,
+               .maxlen = 1,
+               .off1   = offsetof(struct thread_options, zrt),
+               .minfp  = 0,
+               .maxfp  = 1,
+               .category = FIO_OPT_C_IO,
+               .group  = FIO_OPT_G_ZONE,
+       },
+       {
+               .name   = "zone_reset_frequency",
+               .lname  = "Zone reset frequency",
+               .help   = "Zoned block device zone reset frequency in HZ",
+               .type   = FIO_OPT_FLOAT_LIST,
+               .maxlen = 1,
+               .off1   = offsetof(struct thread_options, zrf),
+               .minfp  = 0,
+               .maxfp  = 1,
+               .category = FIO_OPT_C_IO,
+               .group  = FIO_OPT_G_ZONE,
+       },
        {
                .name   = "lockmem",
                .lname  = "Lock memory",