mmap backend invalidate fix
[fio.git] / cconv.c
diff --git a/cconv.c b/cconv.c
index 18edc0f30d8a22fefc92e3a28d01a3c4d2301240..0fca764e97865b8e4bd9fbaf869a6d9c489c71ec 100644 (file)
--- 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);
@@ -217,7 +219,6 @@ void convert_thread_options_to_cpu(struct thread_options *o,
        o->unified_rw_rep = le32_to_cpu(top->unified_rw_rep);
        o->gtod_reduce = le32_to_cpu(top->gtod_reduce);
        o->gtod_cpu = le32_to_cpu(top->gtod_cpu);
-       o->gtod_offload = le32_to_cpu(top->gtod_offload);
        o->clocksource = le32_to_cpu(top->clocksource);
        o->no_stall = le32_to_cpu(top->no_stall);
        o->trim_percentage = le32_to_cpu(top->trim_percentage);
@@ -257,7 +258,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);
@@ -377,7 +380,6 @@ void convert_thread_options_to_net(struct thread_options_pack *top,
        top->unified_rw_rep = cpu_to_le32(o->unified_rw_rep);
        top->gtod_reduce = cpu_to_le32(o->gtod_reduce);
        top->gtod_cpu = cpu_to_le32(o->gtod_cpu);
-       top->gtod_offload = cpu_to_le32(o->gtod_offload);
        top->clocksource = cpu_to_le32(o->clocksource);
        top->no_stall = cpu_to_le32(o->no_stall);
        top->trim_percentage = cpu_to_le32(o->trim_percentage);