Document oddity with --status-interval and --output-format=json
[fio.git] / init.c
diff --git a/init.c b/init.c
index ede0a8b97c773b2dd971c259c2f05c306dd84afa..b925b4ca33d2521031f4dd6a844d233b5ca8ee05 100644 (file)
--- a/init.c
+++ b/init.c
@@ -63,6 +63,7 @@ char *exec_profile = NULL;
 int warnings_fatal = 0;
 int terse_version = 3;
 int is_backend = 0;
+int is_local_backend = 0;
 int nr_clients = 0;
 int log_syslog = 0;
 
@@ -258,7 +259,7 @@ static struct option l_opts[FIO_NR_OPTIONS] = {
        {
                .name           = (char *) "status-interval",
                .has_arg        = required_argument,
-               .val            = 'L',
+               .val            = 'L' | FIO_CLIENT_FLAG,
        },
        {
                .name           = (char *) "trigger-file",
@@ -617,17 +618,34 @@ static int fixup_options(struct thread_data *td)
                ret |= warnings_fatal;
        }
 
+       if (o->zone_mode == ZONE_MODE_NONE && o->zone_size) {
+               log_err("fio: --zonemode=none and --zonesize are not compatible.\n");
+               ret |= 1;
+       }
+
+       if (o->zone_mode == ZONE_MODE_STRIDED && !o->zone_size) {
+               log_err("fio: --zonesize must be specified when using --zonemode=strided.\n");
+               ret |= 1;
+       }
+
+       if (o->zone_mode == ZONE_MODE_NOT_SPECIFIED) {
+               if (o->zone_size)
+                       o->zone_mode = ZONE_MODE_STRIDED;
+               else
+                       o->zone_mode = ZONE_MODE_NONE;
+       }
+
        /*
-        * only really works with 1 file
+        * Strided zone mode only really works with 1 file.
         */
-       if (o->zone_size && o->open_files > 1)
-               o->zone_size = 0;
+       if (o->zone_mode == ZONE_MODE_STRIDED && o->open_files > 1)
+               o->zone_mode = ZONE_MODE_NONE;
 
        /*
         * If zone_range isn't specified, backward compatibility dictates it
         * should be made equal to zone_size.
         */
-       if (o->zone_size && !o->zone_range)
+       if (o->zone_mode == ZONE_MODE_STRIDED && !o->zone_range)
                o->zone_range = o->zone_size;
 
        /*
@@ -2262,6 +2280,10 @@ const struct debug_level debug_levels[] = {
          .help = "Helper thread logging",
          .shift = FD_HELPERTHREAD,
        },
+       { .name = "zbd",
+         .help = "Zoned Block Device logging",
+         .shift = FD_ZBD,
+       },
        { .name = NULL, },
 };