All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Damien Le Moal <damien.lemoal@opensource.wdc.com>,
	Niklas Cassel <Niklas.Cassel@wdc.com>
Cc: "fio@vger.kernel.org" <fio@vger.kernel.org>
Subject: Re: [PATCH 2/2] stat: move unified=both mixed allocation and calculation to new helper
Date: Mon, 17 Jan 2022 07:21:21 -0700	[thread overview]
Message-ID: <3f4cd459-7f5d-68d6-e271-d8f0e7ec599f@kernel.dk> (raw)
In-Reply-To: <0ea0d8c2-e4aa-07c9-1691-62e498710252@opensource.wdc.com>

On 1/16/22 5:45 PM, Damien Le Moal wrote:
>> +static struct thread_stat *gen_mixed_ddir_stats_from_ts(struct thread_stat *ts)
>> +{
>> +	struct thread_stat *ts_lcl;
>> +
>> +	/*
>> +	 * Handle aggregation of Reads (ddir = 0), Writes (ddir = 1), and
>> +	 * Trims (ddir = 2)
>> +	 */
>> +	ts_lcl = malloc(sizeof(struct thread_stat));
> 
> No failed allocation check ?

For better or worse, fio generally just happily ignores allocation
failures... That doesn't mean that we should not move towards making
that better, particularly for new additions and where it's easy to
handle it.

-- 
Jens Axboe


  parent reply	other threads:[~2022-01-17 14:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-14 15:46 [PATCH 1/2] stat: remove duplicated code in show_mixed_ddir_status() Niklas Cassel
2022-01-14 15:46 ` [PATCH 2/2] stat: move unified=both mixed allocation and calculation to new helper Niklas Cassel
2022-01-17  0:45   ` Damien Le Moal
2022-01-17 11:06     ` Niklas Cassel
2022-01-17 14:21     ` Jens Axboe [this message]
2022-01-17  0:48 ` [PATCH 1/2] stat: remove duplicated code in show_mixed_ddir_status() Damien Le Moal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3f4cd459-7f5d-68d6-e271-d8f0e7ec599f@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=Niklas.Cassel@wdc.com \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=fio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.