From: David Sterba <dsterba@suse.cz>
To: WenRuo Qu <wqu@suse.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] btrfs-progs: Kill ASSERT() for damaged filesystem
Date: Wed, 3 Jul 2019 13:37:06 +0200 [thread overview]
Message-ID: <20190703113706.GS20977@twin.jikos.cz> (raw)
In-Reply-To: <20190703072428.13759-1-wqu@suse.com>
On Wed, Jul 03, 2019 at 07:24:42AM +0000, WenRuo Qu wrote:
> For damaged filesystem like 'bko-155621-bad-block-group-offset.raw' from
> fuzzed tests, there may be no valid METADATA blocks at all.
>
> Thus we could hit the following ASSERT():
> extent-tree.c:2484: alloc_tree_block: Assertion `sinfo` failed, value 0
> btrfs(+0x20ef8)[0x555adf5b2ef8]
> btrfs(+0x2107b)[0x555adf5b307b]
> btrfs(+0x27e7e)[0x555adf5b9e7e]
> btrfs(btrfs_alloc_free_block+0x67)[0x555adf5ba097]
> btrfs(+0x61188)[0x555adf5f3188]
> btrfs(+0x70921)[0x555adf602921]
> btrfs(main+0x94)[0x555adf5a7168]
> /usr/lib/libc.so.6(__libc_start_main+0xf3)[0x7fbd4c658ee3]
> btrfs(_start+0x2e)[0x555adf5a6cee]
>
> The ASSERT() expects that every filesystem has one METADATA block
> groups, but btrfs-check can accept any damaged filesystem.
>
> So kill the ASSERT(), and return -EUCLEAN with one error message.
>
> Signed-off-by: Qu Wenruo <wqu@suse.com>
> ---
> To David:
> Please fold this tiny modification to the following patch:
> a970af98a1eb ("btrfs-progs: Fix false ENOSPC alert by tracking used space
> correctly").
Folded to the patch, thanks. The fuzz-tests have been enabled in the
continuous integration but due to other problems the status is red so I
did not notice. Once the CI situtation is resolved, we'll know sooner
that something regressed.
prev parent reply other threads:[~2019-07-03 11:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-03 7:24 [PATCH] btrfs-progs: Kill ASSERT() for damaged filesystem WenRuo Qu
2019-07-03 11:37 ` David Sterba [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=20190703113706.GS20977@twin.jikos.cz \
--to=dsterba@suse.cz \
--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;
as well as URLs for NNTP newsgroup(s).