From: Qu Wenruo <wqu@suse.com>
To: dsterba@suse.cz
Cc: David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/5] Assertion and debugging helpers
Date: Thu, 17 Apr 2025 08:14:45 +0930 [thread overview]
Message-ID: <a05cbb2e-8ec2-4763-b60f-67fa1d766eb4@suse.com> (raw)
In-Reply-To: <20250416223002.GH13877@suse.cz>
在 2025/4/17 08:00, David Sterba 写道:
> On Wed, Apr 16, 2025 at 10:20:56PM +0200, David Sterba wrote:
>>> So, if we're pushing towards VASSERT(), then it should replace all
>>> ASSERT() eventually. At least mark the ASSERT() macro deprecated and
>>> stop new usages.
>>
>> You can consider VASSERT equivalent to ASSERT, the only reason it's a
>> different macro now is because I'd have to implement the variable number
>> of arguments and printk. But I can look into that, I agree that having
>> just ASSERT would be best in the long term.
>
> I have something, so the following will work:
>
> ASSERT(condition);
> ASSERT(condition, "string");
> ASSERT(condition, "string=%d", variable);
That will be great, we can keep the single ASSERT() debug type, with all
the new extra output.
Thanks,
Qu
prev parent reply other threads:[~2025-04-16 22:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-16 9:08 [PATCH 0/5] Assertion and debugging helpers David Sterba
2025-04-16 9:08 ` [PATCH 1/5] btrfs: add verbose version of ASSERT David Sterba
2025-04-16 15:03 ` Johannes Thumshirn
2025-04-16 19:30 ` David Sterba
2025-04-16 9:08 ` [PATCH 2/5] btrfs: example use of VASSERT() in volumes.c David Sterba
2025-04-16 9:08 ` [PATCH 3/5] btrfs: add debug build only WARN David Sterba
2025-04-16 9:08 ` [PATCH 4/5] btrfs: convert WARN_ON(IS_ENABLED(CONFIG_BTRFS_DEBUG)) to DEBUG_WARN David Sterba
2025-04-16 9:08 ` [PATCH 5/5] btrfs: convert ASSERT(0) to DEBUG_WARN() David Sterba
2025-04-16 10:55 ` [PATCH 0/5] Assertion and debugging helpers Qu Wenruo
2025-04-16 20:20 ` David Sterba
2025-04-16 22:30 ` David Sterba
2025-04-16 22:44 ` Qu Wenruo [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=a05cbb2e-8ec2-4763-b60f-67fa1d766eb4@suse.com \
--to=wqu@suse.com \
--cc=dsterba@suse.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox