Fix server/client set_options conversion
Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/cconv.c b/cconv.c
index 18edc0f..0de2f5c 100644
--- a/cconv.c
+++ b/cconv.c
@@ -49,7 +49,9 @@
{
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 @@
{
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 0a98bf5..cd3f999 100644
--- a/server.h
+++ b/server.h
@@ -38,7 +38,7 @@
};
enum {
- FIO_SERVER_VER = 40,
+ FIO_SERVER_VER = 41,
FIO_SERVER_MAX_FRAGMENT_PDU = 1024,
FIO_SERVER_MAX_CMD_MB = 2048,