Re: [PATCH v2 3/6] stat: Handle `ENOMEM` case in `__show_run_stats()`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux