* Some curious code across the project
@ 2019-05-06 13:22 Erwan Velu
0 siblings, 0 replies; only message in thread
From: Erwan Velu @ 2019-05-06 13:22 UTC (permalink / raw
To: fio@vger.kernel.org
Hi Jens,
I spotted some code that looks like a mistake or needs to be explicated.
https://github.com/axboe/fio/blob/master/log.c#L127
In this code, we can see two fwrite overrding the same ret variable.
I was wondering if these two fwrite must be exclusive to each other or
if ret value must be inspected before being overwritten.
There is almost the same case here :
https://github.com/axboe/fio/blob/051382218cbe5101a5caa83eab55ed04608f8475/blktrace.c#L763
https://github.com/axboe/fio/blob/051382218cbe5101a5caa83eab55ed04608f8475/zbd.c#L1330
"new_len = new_len / min_bs * min_bs"
I'm not really what it means to be done here. Is it a typo or a kind of
rounding ?
https://github.com/axboe/fio/blob/051382218cbe5101a5caa83eab55ed04608f8475/engines/sg.c#L461
Looks like the ret is useless here.
https://github.com/axboe/fio/blob/051382218cbe5101a5caa83eab55ed04608f8475/engines/sg.c#L964
ret value is unused here, shall we return it or just ignore ret ?
https://github.com/axboe/fio/blob/051382218cbe5101a5caa83eab55ed04608f8475/lib/fls.h#L35
Looks like the x <<= 1 do anything here as x is a local value and we
don't process it anymore.
I can provide patches to these issues,
Erwan,
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-05-06 13:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-06 13:22 Some curious code across the project Erwan Velu
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.