From: Jens Axboe Date: Tue, 9 Dec 2014 21:12:47 +0000 (-0700) Subject: Fix server/client set_options conversion X-Git-Tag: fio-2.2.0~26 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=3b577774803435109e070cc8f4313fc485c9160f Fix server/client set_options conversion Signed-off-by: Jens Axboe --- 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,