linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/2] btrfs: fix the generic/475 crash for subpage case
Date: Mon,  2 Aug 2021 14:54:45 +0800	[thread overview]
Message-ID: <20210802065447.178726-1-wqu@suse.com> (raw)

Test case generic/475 expose random crash (1/20~1/5) trigged by the
BUG_ON() inside btrfs_csum_one_bio().

The direct cause is we're trying to submit a write bio, even after we hit
some error and already have ordered extent cleaned up.

The first patch will try to fix all those call sites, then the 2nd patch
will add an extra safe net to prevent such case to be escalated into a
crash.

Qu Wenruo (2):
  btrfs: don't try to flush data write bio if we hit error preparing it
  btrfs: replace BUG_ON() in btrfs_csum_one_bio() with proper error
    handling

 fs/btrfs/extent_io.c | 17 ++++++++++++-----
 fs/btrfs/file-item.c | 14 +++++++++++++-
 2 files changed, 25 insertions(+), 6 deletions(-)

-- 
2.32.0


             reply	other threads:[~2021-08-02  6:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-02  6:54 Qu Wenruo [this message]
2021-08-02  6:54 ` [PATCH 1/2] btrfs: don't try to flush data write bio if we hit error preparing it Qu Wenruo
2021-08-02  6:54 ` [PATCH 2/2] btrfs: replace BUG_ON() in btrfs_csum_one_bio() with proper error handling Qu Wenruo
2021-08-02  7:53   ` Nikolay Borisov
2021-08-02  8:03     ` Qu Wenruo
2021-08-02  8:49       ` Nikolay Borisov
2021-08-16 14:21         ` David Sterba
2021-08-16 23:30           ` Qu Wenruo
2021-08-03  5:31 ` [PATCH 0/2] btrfs: fix the generic/475 crash for subpage case 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=20210802065447.178726-1-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).