pvsync2: Add hipri_percentage option
[fio.git] / t / verify-state.c
index d744e6f12f6465a7b6b05f3d248dffea371e0b62..78a56dafd26878e3a5fec7bced3382fe20385c43 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);
@@ -56,7 +58,8 @@ static void show(struct thread_io_list *s, size_t size)
                show_s(s, no_s);
                no_s++;
                size -= __thread_io_list_sz(s->depth, s->nofiles);
-               s = (void *) s + __thread_io_list_sz(s->depth, s->nofiles);
+               s = (struct thread_io_list *)((char *) s +
+                       __thread_io_list_sz(s->depth, s->nofiles));
        } while (size != 0);
 }