From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: dsterba@suse.cz, Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: space-info: fix the wrong trace name for bytes_may_use
Date: Wed, 14 Oct 2020 19:59:07 +0800 [thread overview]
Message-ID: <d19621c2-2a8c-2676-f848-3c341af3e413@gmx.com> (raw)
In-Reply-To: <20201014114414.GK6756@twin.jikos.cz>
[-- Attachment #1.1: Type: text/plain, Size: 1306 bytes --]
On 2020/10/14 下午7:44, David Sterba wrote:
> On Mon, Oct 12, 2020 at 02:56:24PM +0800, Qu Wenruo wrote:
>> The trace_name for bytes_may_use should be "may_use", "space_info".
>>
>> Fixes: f3e75e3805e1 ("btrfs: roll tracepoint into btrfs_space_info_update helper")
>
> This patch reduced all calls to the definition and kept the same output,
> ie. the 'space_info' so it was correct and the Fixes does not seem to be
> right here. You should explain why the 'may_use' is supposed to be
> there.
>
The next bytes_pinned still uses "pinned" for its name.
And in the DECLARE_SPACE_INFO_UPDATE(), the @trace_name is only passed
to trcae_btrfs_space_reservation(), to indicate the cause of the trace
event.
Under most case, we pass things like "space_info:enospc" for cases we
will going to return -ENOSPC, and for other cases, we pass what we're
reserving for, like in btrfs_delalloc_reserve_metadata().
For the bytes_may_use case, the DECLARE_SPACE_INFO_UPDATE() is
definitely not called for ENOSPC, thus it should what we're reserving for.
Since the declared function has no real context, thus using the
"may_use" looks completely sane to me.
The fixes looks correct, as it looks like a copy-n-paste error from that
commit.
Or did I miss somthing?
Thanks,
Qu
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-10-14 11:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-12 6:56 [PATCH] btrfs: space-info: fix the wrong trace name for bytes_may_use Qu Wenruo
2020-10-12 12:08 ` Nikolay Borisov
2020-10-14 11:44 ` David Sterba
2020-10-14 11:59 ` Qu Wenruo [this message]
2020-10-22 13:35 ` David Sterba
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=d19621c2-2a8c-2676-f848-3c341af3e413@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=wqu@suse.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).