All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/2] btrfs: raid56: minor fixes to rmw_rbio()
Date: Wed, 28 Oct 2026 17:00:45 +1030	[thread overview]
Message-ID: <cover.1793168898.git.wqu@suse.com> (raw)

I was checking the bio_list_lock usage as some call sites doesn't look
sane, e.g. spin_lock(); set_bit(); spin_unlock();.

But during the cleanup and reviewing, LLM exposed two new bugs:

- rbio_orig_end_io() can race with lock_stripe_add()
  And rbio_orig_end_io() didn't hold the bio_list_lock, under certain
  race condition, a bio can even be missing.

  Fixed by the first patch.

- Failed rbio can still be cached
  Fixed by the second patch.

Qu Wenruo (2):
  btrfs: fix racy bio_list changes for failed RMW rbio
  btrfs: don't cache rbio if an error is hit

 fs/btrfs/raid56.c | 35 +++++++++++++++++++++++------------
 1 file changed, 23 insertions(+), 12 deletions(-)

-- 
2.56.0


             reply	other threads:[~2026-10-28  6:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28  6:30 Qu Wenruo [this message]
2026-10-28  6:30 ` [PATCH 1/2] btrfs: fix racy bio_list changes for failed RMW rbio Qu Wenruo
2026-10-28  6:30 ` [PATCH 2/2] btrfs: don't cache rbio if an error is hit Qu Wenruo
2026-10-28 16:52 ` [PATCH 0/2] btrfs: raid56: minor fixes to rmw_rbio() Filipe Manana

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=cover.1793168898.git.wqu@suse.com \
    --to=wqu@suse.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.