mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: Siddharth Mishra <smish149@asu.edu>
Cc: dsterba@suse.com, mason@kernel.org, josef@toxicpanda.com,
	fdmanana@kernel.org, linux-btrfs@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	syzbot+dc9291cf132691aeb478@syzkaller.appspotmail.com,
	stable@vger.kernel.org
Subject: Re: [PATCH 1/2] btrfs: overwrite a leftover balance item instead of BUG_ON()
Date: Fri, 6 Nov 2026 09:13:11 +1030	[thread overview]
Message-ID: <c6d8ece0-cbb8-4479-977a-6306b1c02ae7@suse.com> (raw)
In-Reply-To: <20261105224022.254528-1-smish149@asu.edu>



在 2026/11/6 09:10, Siddharth Mishra 写道:
> On Fri, Nov 06, 2026 at 08:39:01AM +1030, Qu Wenruo wrote:
>>>
>>> Both assumptions can be wrong:
>>>
>>> - insert_balance_item() inserts the item, then commits the transaction.
>>>     btrfs_commit_transaction() can fail without aborting the
>>>     transaction, for example when btrfs_start_dirty_block_groups() fails
>>>     to allocate a path.
>>
>> I think no call site can handle a btrfs_commit_transaction() failure
>> without transaction abort.
>>
>> This is a way bigger problem than what you're fixing.
> 
> Are you suggesting that the right fix is to make
> btrfs_commit_transaction() abort the transaction when
> btrfs_start_dirty_block_groups() fails?

At least one should check if all btrfs_commit_transaction() callers can 
handle such error correctly.

  reply	other threads:[~2026-11-05 22:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05 21:47 [PATCH 0/2] btrfs: balance item fixes Siddharth Mishra
2026-11-05 21:47 ` [PATCH 1/2] btrfs: overwrite a leftover balance item instead of BUG_ON() Siddharth Mishra
2026-11-05 22:09   ` Qu Wenruo
2026-11-05 22:40     ` Siddharth Mishra
2026-11-05 22:43       ` Qu Wenruo [this message]
2026-11-05 21:47 ` [PATCH 2/2] btrfs: tree-checker: add balance item size check Siddharth Mishra
2026-11-05 22:06   ` Qu Wenruo

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=c6d8ece0-cbb8-4479-977a-6306b1c02ae7@suse.com \
    --to=wqu@suse.com \
    --cc=dsterba@suse.com \
    --cc=fdmanana@kernel.org \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mason@kernel.org \
    --cc=smish149@asu.edu \
    --cc=stable@vger.kernel.org \
    --cc=syzbot+dc9291cf132691aeb478@syzkaller.appspotmail.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

all inboxes | Powered by JetHome®