From 3b577774803435109e070cc8f4313fc485c9160f Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 9 Dec 2014 14:12:47 -0700 Subject: [PATCH] Fix server/client set_options conversion Signed-off-by: Jens Axboe --- cconv.c | 8 ++++++-- server.h | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cconv.c b/cconv.c index 18edc0f3..0de2f5c7 100644 --- a/cconv.c +++ b/cconv.c @@ -49,7 +49,9 @@ void convert_thread_options_to_cpu(struct thread_options *o, { int i, j; - memcpy(o->set_options, top->set_options, NR_OPTS_SZ * sizeof(uint64_t)); + for (i = 0; i < NR_OPTS_SZ; i++) + o->set_options[i] = le64_to_cpu(top->set_options[i]); + string_to_cpu(&o->description, top->description); string_to_cpu(&o->name, top->name); string_to_cpu(&o->directory, top->directory); @@ -257,7 +259,9 @@ void convert_thread_options_to_net(struct thread_options_pack *top, { int i, j; - memcpy(top->set_options, o->set_options, NR_OPTS_SZ * sizeof(uint64_t)); + for (i = 0; i < NR_OPTS_SZ; i++) + top->set_options[i] = cpu_to_le64(o->set_options[i]); + string_to_net(top->description, o->description); string_to_net(top->name, o->name); string_to_net(top->directory, o->directory); diff --git a/server.h b/server.h index 0a98bf5b..cd3f9993 100644 --- a/server.h +++ b/server.h @@ -38,7 +38,7 @@ struct fio_net_cmd_reply { }; enum { - FIO_SERVER_VER = 40, + FIO_SERVER_VER = 41, FIO_SERVER_MAX_FRAGMENT_PDU = 1024, FIO_SERVER_MAX_CMD_MB = 2048, -- 2.25.1