t/verify-state: improve verify state inflight output
authorSitsofe Wheeler <sitsofe@yahoo.com>
Thu, 4 Sep 2025 21:16:44 +0000 (22:16 +0100)
committerSitsofe Wheeler <sitsofe@yahoo.com>
Thu, 4 Sep 2025 21:52:23 +0000 (22:52 +0100)
- Move INVALID_NUMBERIO to the verify-state.h to make it accessible to
  t/verify-state.c
- Make unused inflight I/O slots more obvious

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
fio.h
t/verify-state.c
verify-state.h

diff --git a/fio.h b/fio.h
index 447888990fb4cf821fd5171b388e04a0b1f16fdf..037678d182b8628ba1e371e5d4cfe5c2f53f2488 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -73,8 +73,6 @@ struct fio_sem;
 
 #define MAX_TRIM_RANGE 256
 
-#define INVALID_NUMBERIO UINT64_MAX
-
 /*
  * Range for trim command
  */
index b6b370798ffe704523438fe2409f2b79231be4ec..9d76e501a1e4e54964c072dc8ad4ea1b1e21aab6 100644 (file)
@@ -29,8 +29,13 @@ static void show_s(struct thread_io_list *s, unsigned int no_s)
        if (!s->depth)
                return;
        for (i = s->depth - 1; i >= 0; i--) {
-               printf("\t%llu\n",
-                               (unsigned long long) s->inflight[i].numberio);
+               uint64_t numberio;
+               numberio = s->inflight[i].numberio;
+               if (numberio == INVALID_NUMBERIO)
+                       printf("\tNot inflight\n");
+               else
+                       printf("\t%llu\n",
+                              (unsigned long long) s->inflight[i].numberio);
        }
 }
 
index d8997ace354e5fdfa7db3c185b6d4c8666659c04..27eb9e9a06b4d0f2a81898f42097d7fae8bd035f 100644 (file)
@@ -101,4 +101,6 @@ static inline void verify_state_gen_name(char *out, size_t size,
        out[size - 1] = '\0';
 }
 
+#define INVALID_NUMBERIO UINT64_MAX
+
 #endif