* rand_seed declarations not consistent...is that ok?
@ 2014-01-28 19:10 Grant Grundler
2014-01-28 19:24 ` Jens Axboe
0 siblings, 1 reply; 3+ messages in thread
From: Grant Grundler @ 2014-01-28 19:10 UTC (permalink / raw)
To: FIO_list; +Cc: Jens Axboe
cscope tells me:
C symbol: rand_seed
File Function Line
0 ioengine.h <global> 59 unsigned long rand_seed;
1 options.c <global> 1660 .off1 =
td_var_offset(rand_seed),
2 thread_options.h <global> 103 unsigned int rand_seed;
3 thread_options.h <global> 327 uint32_t rand_seed;
4 verify.h <global> 34 uint64_t rand_seed;
Any reason we have 4 different declarations of the same name?
Thoughts on if/how this should be fixed?
Even if it's not wrong, it's definitely confusing.
thanks,
grant
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: rand_seed declarations not consistent...is that ok?
2014-01-28 19:10 rand_seed declarations not consistent...is that ok? Grant Grundler
@ 2014-01-28 19:24 ` Jens Axboe
2014-01-28 21:06 ` Grant Grundler
0 siblings, 1 reply; 3+ messages in thread
From: Jens Axboe @ 2014-01-28 19:24 UTC (permalink / raw)
To: Grant Grundler; +Cc: FIO_list
On Tue, Jan 28 2014, Grant Grundler wrote:
> cscope tells me:
> C symbol: rand_seed
>
> File Function Line
> 0 ioengine.h <global> 59 unsigned long rand_seed;
> 1 options.c <global> 1660 .off1 =
> td_var_offset(rand_seed),
> 2 thread_options.h <global> 103 unsigned int rand_seed;
> 3 thread_options.h <global> 327 uint32_t rand_seed;
> 4 verify.h <global> 34 uint64_t rand_seed;
>
> Any reason we have 4 different declarations of the same name?
> Thoughts on if/how this should be fixed?
>
> Even if it's not wrong, it's definitely confusing.
Heh no. But they are not all the same. Could be cleaned up, but the
parser has some expectations and the thread_options.h one has the local
and over-the-net client version (which is why they are different, one
matches the parser and the other is independent). I would suggest we
make 0/3/4 a uint64_t to unify that part. The option could be made
unsigned long long and the type changed.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: rand_seed declarations not consistent...is that ok?
2014-01-28 19:24 ` Jens Axboe
@ 2014-01-28 21:06 ` Grant Grundler
0 siblings, 0 replies; 3+ messages in thread
From: Grant Grundler @ 2014-01-28 21:06 UTC (permalink / raw)
To: Jens Axboe; +Cc: FIO_list
On Tue, Jan 28, 2014 at 11:24 AM, Jens Axboe <axboe@kernel.dk> wrote:
> On Tue, Jan 28 2014, Grant Grundler wrote:
>> cscope tells me:
>> C symbol: rand_seed
>>
>> File Function Line
>> 0 ioengine.h <global> 59 unsigned long rand_seed;
>> 1 options.c <global> 1660 .off1 =
>> td_var_offset(rand_seed),
>> 2 thread_options.h <global> 103 unsigned int rand_seed;
>> 3 thread_options.h <global> 327 uint32_t rand_seed;
>> 4 verify.h <global> 34 uint64_t rand_seed;
>>
>> Any reason we have 4 different declarations of the same name?
>> Thoughts on if/how this should be fixed?
>>
>> Even if it's not wrong, it's definitely confusing.
>
> Heh no. But they are not all the same. Could be cleaned up, but the
> parser has some expectations and the thread_options.h one has the local
> and over-the-net client version (which is why they are different, one
> matches the parser and the other is independent).
I gathered there were some differences. :)
> I would suggest we make 0/3/4 a uint64_t to unify that part.
That's easy. Patch sent: [PATCH] fio: consolidate rand_seed to uint64_t
Did I interpret that correctly?
BTW, I've not tested that patch...will do that and reply to the patch
if there are any new issues.
> The option could be made
> unsigned long long and the type changed.
I think this needs a bit more research (but only very little). Anyone
else want a relatively quick/easy project?
I don't need all the glory. :)
cheers,
grant
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-28 21:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-28 19:10 rand_seed declarations not consistent...is that ok? Grant Grundler
2014-01-28 19:24 ` Jens Axboe
2014-01-28 21:06 ` Grant Grundler
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.