From eeea64a6ad6c1fed6c477a49bd5398559cf667d3 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 15 Apr 2016 09:03:34 -0600 Subject: [PATCH] t/fio-verify-state: show completions in order We currently show them in array order, but that's logged in reverse. So show them from newest to latest. Signed-off-by: Jens Axboe --- t/verify-state.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/verify-state.c b/t/verify-state.c index d744e6f1..9a2c3df6 100644 --- a/t/verify-state.c +++ b/t/verify-state.c @@ -27,7 +27,9 @@ static void show_s(struct thread_io_list *s, unsigned int no_s) printf("Index:\t\t%llu\n", (unsigned long long) s->index); printf("Completions:\n"); - for (i = 0; i < s->no_comps; i++) { + if (!s->no_comps) + return; + for (i = s->no_comps - 1; i >= 0; i--) { printf("\t(file=%2llu) %llu\n", (unsigned long long) s->comps[i].fileno, (unsigned long long) s->comps[i].offset); -- 2.25.1