From cfc03e4639fc29bf879f565300fe0238dd8b5ba9 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 12 Oct 2011 21:20:42 +0200 Subject: [PATCH] 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 --- server.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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++) { -- 2.25.1