t/aio-ring: print head/tail as unsigneds
authorJens Axboe <axboe@kernel.dk>
Fri, 21 Dec 2018 22:37:16 +0000 (15:37 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 21 Dec 2018 22:37:16 +0000 (15:37 -0700)
Since we're wrapping now and using the full range, we can get
logging ala:

IOPS=1094880, IOS/call=32/32, inflight=32 (head=-1509517216 tail=-1509517216), Cachehit=0.00%

Ensure we print as unsigned, as that's the right type.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
t/aio-ring.c

index 0d53b57..900f464 100644 (file)
@@ -443,7 +443,7 @@ int main(int argc, char *argv[])
                        rpc = (this_done - done) / (this_call - calls);
                        ipc = (this_reap - reap) / (this_call - calls);
                }
-               printf("IOPS=%lu, IOS/call=%lu/%lu, inflight=%u (head=%d tail=%d), Cachehit=%0.2f%%\n",
+               printf("IOPS=%lu, IOS/call=%lu/%lu, inflight=%u (head=%u tail=%u), Cachehit=%0.2f%%\n",
                                this_done - done, rpc, ipc, s->inflight,
                                s->cq_ring->head, s->cq_ring->tail, hit);
                done = this_done;