server: fix bug in converting/storing clat percentiles
authorJens Axboe <axboe@kernel.dk>
Wed, 12 Oct 2011 19:20:42 +0000 (21:20 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 12 Oct 2011 19:20:42 +0000 (21:20 +0200)
It helps when you read the source values, instead of storing and
converting the destinations values only.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
server.c

index 2c20e37b7e053f60d3528d4909b82d721edd2032..dcce37eea822be362221aa9867733b638c446706 100644 (file)
--- a/server.c
+++ b/server.c
@@ -671,9 +671,10 @@ void fio_server_send_ts(struct thread_stat *ts, struct group_run_stats *rs)
        p.ts.clat_percentiles   = cpu_to_le64(ts->clat_percentiles);
 
        for (i = 0; i < FIO_IO_U_LIST_MAX_LEN; i++) {
-               fio_fp64_t *fp = &p.ts.percentile_list[i];
+               fio_fp64_t *src = &ts->percentile_list[i];
+               fio_fp64_t *dst = &p.ts.percentile_list[i];
 
-               fp->u.i = __cpu_to_le64(fio_double_to_uint64(fp->u.f));
+               dst->u.i = __cpu_to_le64(fio_double_to_uint64(src->u.f));
        }
 
        for (i = 0; i < FIO_IO_U_MAP_NR; i++) {