From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: selftests: dump extent io tree if extent-io-tree test failed
Date: Mon, 3 Jan 2022 19:08:32 +0100 [thread overview]
Message-ID: <20220103180832.GK28560@twin.jikos.cz> (raw)
In-Reply-To: <20211230084513.29292-1-wqu@suse.com>
On Thu, Dec 30, 2021 at 04:45:13PM +0800, Qu Wenruo wrote:
> When code modifying extent-io-tree get modified and got that selftest
> failed, it can take some time to pin down the cause.
>
> To make it easier to expose the problem, dump the extent io tree if the
> selftest failed.
>
> This can save developers debug time, especially since the selftest we
> can not use the trace events, thus have to manually add debug trace
> points.
>
> Signed-off-by: Qu Wenruo <wqu@suse.com>
Added to misc-next, thanks.
> ---
> fs/btrfs/tests/extent-io-tests.c | 52 ++++++++++++++++++++++++++++++++
> 1 file changed, 52 insertions(+)
>
> diff --git a/fs/btrfs/tests/extent-io-tests.c b/fs/btrfs/tests/extent-io-tests.c
> index c2e72e7a8ff0e..160480f6155e8 100644
> --- a/fs/btrfs/tests/extent-io-tests.c
> +++ b/fs/btrfs/tests/extent-io-tests.c
> @@ -56,6 +56,54 @@ static noinline int process_page_range(struct inode *inode, u64 start, u64 end,
> return count;
> }
>
> +#define STATE_FLAG_STR_LEN 256
> +
> +#define print_one_flag(state, dest, cur, name) \
Please use uppercase name for magic macros.
prev parent reply other threads:[~2022-01-03 18:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-30 8:45 [PATCH] btrfs: selftests: dump extent io tree if extent-io-tree test failed Qu Wenruo
2022-01-03 16:07 ` Josef Bacik
2022-01-03 18:08 ` 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=20220103180832.GK28560@twin.jikos.cz \
--to=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