Skip to content

Commit 83a809b

Browse files
committed
Merge branch 'fix_verify-state' of https://github.com/sitsofe/fio
* 'fix_verify-state' of https://github.com/sitsofe/fio: t/verify-state: improve verify state inflight output t/verify-state: synchronise verify state version
2 parents b7ce90b + 3b730c6 commit 83a809b

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

fio.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ struct fio_sem;
7373

7474
#define MAX_TRIM_RANGE 256
7575

76-
#define INVALID_NUMBERIO UINT64_MAX
77-
7876
/*
7977
* Range for trim command
8078
*/

t/verify-state.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,13 @@ static void show_s(struct thread_io_list *s, unsigned int no_s)
2929
if (!s->depth)
3030
return;
3131
for (i = s->depth - 1; i >= 0; i--) {
32-
printf("\t%llu\n",
33-
(unsigned long long) s->inflight[i].numberio);
32+
uint64_t numberio;
33+
numberio = s->inflight[i].numberio;
34+
if (numberio == INVALID_NUMBERIO)
35+
printf("\tNot inflight\n");
36+
else
37+
printf("\t%llu\n",
38+
(unsigned long long) s->inflight[i].numberio);
3439
}
3540
}
3641

@@ -84,7 +89,7 @@ static void show_verify_state(void *buf, size_t size)
8489
return;
8590
}
8691

87-
if (hdr->version == 0x04)
92+
if (hdr->version == VSTATE_HDR_VERSION)
8893
show(s, size);
8994
else
9095
log_err("Unsupported version %d\n", (int) hdr->version);

verify-state.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,6 @@ static inline void verify_state_gen_name(char *out, size_t size,
101101
out[size - 1] = '\0';
102102
}
103103

104+
#define INVALID_NUMBERIO UINT64_MAX
105+
104106
#endif

0 commit comments

Comments
 (0)