t/fio-verify-state: show completions in order
authorJens Axboe <axboe@fb.com>
Fri, 15 Apr 2016 15:03:34 +0000 (09:03 -0600)
committerJens Axboe <axboe@fb.com>
Fri, 15 Apr 2016 15:03:34 +0000 (09:03 -0600)
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 <axboe@fb.com>
t/verify-state.c

index d744e6f12f6465a7b6b05f3d248dffea371e0b62..9a2c3df68cb1db568844ad263a600b3a43285167 100644 (file)
@@ -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);