From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: dsterba@suse.cz, Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org, AHN SEOK-YOUNG <iamsyahn@gmail.com>,
Teng Liu <27rabbitlt@gmail.com>
Subject: Re: [PATCH v3] btrfs: warn about extent buffer that can not be released
Date: Tue, 28 Apr 2026 07:31:50 +0930 [thread overview]
Message-ID: <f94d6fe3-e4a5-42ac-bf2b-47d126dbd46b@gmx.com> (raw)
In-Reply-To: <20260427154805.GQ12792@twin.jikos.cz>
在 2026/4/28 01:18, David Sterba 写道:
[...]
>>
>> +static void invalidate_btree_folios(struct btrfs_fs_info *fs_info)
>
> This is too close to the generic invalidate_inode_pages2, please add
> btrfs_ prefix.
Sure, and I'll try to get a better name for it, as we also have
btree_invalidate_folio().
[...]
>> --- a/fs/btrfs/transaction.h
>> +++ b/fs/btrfs/transaction.h
>> @@ -255,13 +255,13 @@ do { \
>> __first = true; \
>> if (WARN(btrfs_abort_should_print_stack(error), \
>> KERN_ERR \
>> - "BTRFS: Transaction aborted (error %d)\n", \
>> - (error))) { \
>> + "BTRFS: Transaction %llu aborted (error %d)\n", \
>> + (trans)->transid, (error))) { \
>> /* Stack trace printed. */ \
>> } else { \
>> btrfs_err((trans)->fs_info, \
>> - "Transaction aborted (error %d)", \
>> - (error)); \
>> + "Transaction %llu aborted (error %d)", \
>> + (trans)->transid, (error)); \
>
> Adding the transaction number adds like 4KiB of object code because the
> calls are inlined so we can have exact location and stack.
>
> It could be possibly moved to __btrfs_abort_transaction() but with some
> additinal shuffling of the code from macro to the handler.
>
I can remove the transid part, as it doesn't contribute to the final bug
that got pinned down.
It's mostly a precautious debug feature.
Thanks,
Qu
next prev parent reply other threads:[~2026-04-27 22:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-16 22:43 [PATCH v3] btrfs: warn about extent buffer that can not be released Qu Wenruo
2026-04-27 15:48 ` David Sterba
2026-04-27 22:01 ` Qu Wenruo [this message]
2026-04-28 15:17 ` 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=f94d6fe3-e4a5-42ac-bf2b-47d126dbd46b@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=27rabbitlt@gmail.com \
--cc=dsterba@suse.cz \
--cc=iamsyahn@gmail.com \
--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