From: Jens Axboe Date: Wed, 12 Oct 2011 19:20:42 +0000 (+0200) Subject: server: fix bug in converting/storing clat percentiles X-Git-Tag: fio-1.99.5~1 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=cfc03e4639fc29bf879f565300fe0238dd8b5ba9;ds=sidebyside server: fix bug in converting/storing clat percentiles It helps when you read the source values, instead of storing and converting the destinations values only. Signed-off-by: Jens Axboe --- diff --git a/server.c b/server.c index 2c20e37b..dcce37ee 100644 --- 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++) {