On Tue, Jan 28, 2014 at 2:03 PM, Jens Axboe <[email protected]> wrote:
...
>> - o->rand_seed = le32_to_cpu(top->rand_seed);
>> + o->rand_seed = le64_to_cpu(top->rand_seed);
>>
>> I saw this when reviewing the code but didn't realize "top" was the
>> packed version that got changed.
>
> Yeah, and vice versa for top -> o.
Oh! :(
(And I assume you mean line 288 as shown below)
If I add this:
diff --git a/cconv.c b/cconv.c
index c4941ba..57996fb 100644
--- a/cconv.c
+++ b/cconv.c
@@ -285,7 +285,7 @@ void convert_thread_options_to_net(struct thread_options_pac
top->do_disk_util = cpu_to_le32(o->do_disk_util);
top->override_sync = cpu_to_le32(o->override_sync);
top->rand_repeatable = cpu_to_le32(o->rand_repeatable);
- top->rand_seed = cpu_to_le32(o->rand_seed);
+ top->rand_seed = cpu_to_le64(o->rand_seed);
top->use_os_rand = cpu_to_le32(o->use_os_rand);
top->log_avg_msec = cpu_to_le32(o->log_avg_msec);
top->norandommap = cpu_to_le32(o->norandommap);
I get this warning:
grundler <2090>make V=1
gcc -o cconv.o -std=gnu99 -Wwrite-strings -Wall
-Wdeclaration-after-statement -O3 -g -ffast-math -D_GNU_SOURCE
-include config-host.h -DBITS_PER_LONG=64
-DFIO_VERSION='"fio-2.1.4-26-g3a2a"' -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG -c cconv.c
CC cconv.o
cconv.c: In function ‘convert_thread_options_to_net’:
cconv.c:288:19: warning: initialization from incompatible pointer type
[enabled by default]
LINK fio
grundler <2091>file cconv.o
cconv.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
286 top->override_sync = cpu_to_le32(o->override_sync);
287 top->rand_repeatable = cpu_to_le32(o->rand_repeatable);
288 top->rand_seed = cpu_to_le64(o->rand_seed);
289 top->use_os_rand = cpu_to_le32(o->use_os_rand);
290 top->log_avg_msec = cpu_to_le32(o->log_avg_msec);
Now I'm just confused.
grant
--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html