On 4/27/22 4:35 PM, Niklas Cassel wrote:
Hello Ammar,
here you allocate runstats with calloc.
+ if (!runstats) {
+ log_err("fio: failed to allocate runstats\n");
+ return;
+ }
for (i = 0; i < groupid + 1; i++)
init_group_run_stat(&runstats[i]);
Here you call init_group_run_stat() on each runstats,
which calls memset(). Seems a bit excessive to clear
the memory to zero twice.
Agreed, I will CC you in the next versions.
Also, it seems like the vger kernel is messed up. My cover letter
and patch #5 don't appear on the lore.
If you intend to modify init_group_run_stat(), be careful,
as it is also called by client.c
Let's use `malloc()` for runstats instead of modifying
init_group_run_stat(), which is way much more simpler.
Will spin v3. Thank you!
--
Ammar Faizi