From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org, Hans van Kranenburg <hans@knorrie.org>
Subject: Re: [PATCH] btrfs: trace: output proper root owner for trace_find_free_extent()
Date: Tue, 28 Jul 2020 15:14:13 +0200 [thread overview]
Message-ID: <20200728131413.GT3703@twin.jikos.cz> (raw)
In-Reply-To: <20200728014249.35532-1-wqu@suse.com>
On Tue, Jul 28, 2020 at 09:42:49AM +0800, Qu Wenruo wrote:
> The current trace event always output result like this:
>
> find_free_extent: root=2(EXTENT_TREE) len=16384 empty_size=0 flags=4(METADATA)
> find_free_extent: root=2(EXTENT_TREE) len=16384 empty_size=0 flags=4(METADATA)
> find_free_extent: root=2(EXTENT_TREE) len=8192 empty_size=0 flags=1(DATA)
> find_free_extent: root=2(EXTENT_TREE) len=8192 empty_size=0 flags=1(DATA)
> find_free_extent: root=2(EXTENT_TREE) len=4096 empty_size=0 flags=1(DATA)
> find_free_extent: root=2(EXTENT_TREE) len=4096 empty_size=0 flags=1(DATA)
>
> It's driving me crazy, as it's saying we're allocating data extent for
> EXTENT tree, which is not even possible.
>
> It's because we always use EXTENT tree as the owner for
> trace_find_free_extent() without using the @root from
> btrfs_reserve_extent().
>
> This patch will change the parameter to use proper @root for
> trace_find_free_extent() to make life a little easier.
>
> Now it looks much better:
> find_free_extent: root=5(FS_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP)
> find_free_extent: root=5(FS_TREE) len=8192 empty_size=0 flags=1(DATA)
> find_free_extent: root=5(FS_TREE) len=16384 empty_size=0 flags=1(DATA)
> find_free_extent: root=5(FS_TREE) len=4096 empty_size=0 flags=1(DATA)
> find_free_extent: root=5(FS_TREE) len=8192 empty_size=0 flags=1(DATA)
> find_free_extent: root=5(FS_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP)
> find_free_extent: root=7(CSUM_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP)
> find_free_extent: root=2(EXTENT_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP)
> find_free_extent: root=1(ROOT_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP)
>
> Reported-by: Hans van Kranenburg <hans@knorrie.org>
> Signed-off-by: Qu Wenruo <wqu@suse.com>
Thanks, added to misc-next, with some changelog adjustments.
prev parent reply other threads:[~2020-07-28 13:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-28 1:42 [PATCH] btrfs: trace: output proper root owner for trace_find_free_extent() Qu Wenruo
2020-07-28 13:14 ` David Sterba [this message]
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=20200728131413.GT3703@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=hans@knorrie.org \
--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