From: Chris Murphy <lists@colorremedies.com>
To: Mike Stevens <michael.stevens@bayer.com>
Cc: Chris Murphy <lists@colorremedies.com>,
Qu Wenruo <quwenruo.btrfs@gmx.com>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: Crashes running btrfs scrub
Date: Fri, 16 Mar 2018 10:44:04 -0600 [thread overview]
Message-ID: <CAJCQCtSW4RxSAPjVC5yZLAjb5WUMDV+8=6Bdt4aUWDhXBuZa5Q@mail.gmail.com> (raw)
In-Reply-To: <4d543ebaf4404f1b8111e48ff221e51d@MOXDE7.na.bayer.cnb>
On Fri, Mar 16, 2018 at 10:17 AM, Mike Stevens
<michael.stevens@bayer.com> wrote:
>> Also, in the meantime, maybe the problem can be prevented by
>> preventing the balance from resuming when mounting. First umount then
>> mount with -o skip_balance.
>
> Thanks for the suggestion Chris. I already had mounted it with skip_balance and then cancelled
> the balance. It will mount, but any significant i/o to the volume cause it to drop r/o.
It's getting confused and doesn't want to corrupt the file system,
that's a good thing.
Basically it wants to create a block group, but this fails. In the
code, before it gets to the particular failure noted in the call
trace, there are multiple different attempts to allocate a block group
but those are also failing.
But here's the thing - the scrub is still being started or resumed. I
didn't think that scrubs are resumed automatically, but you've got
>Mar 15 14:03:06 auswscs9903 kernel: scrub_enumerate_chunks+0x1ad/0x680 [btrfs]
>Mar 15 14:03:06 auswscs9903 kernel: btrfs_scrub_dev+0x21d/0x540 [btrfs]
and
>Mar 15 14:03:06 auswscs9903 kernel: BTRFS warning (device sdag): failed setting block group ro: -30
These are only found in scrub.c
Is there something starting the scrub right away at mount time? Is
there enough time to cancel scrub before it goes read only?
I definitely think there's a bug here somewhere, but it's taking more
than one thing at once to trigger it, so it's a kind of corner case or
it would have been caught sooner.
See if you can prevent scrub from being started, or if it's resuming
on its own for some reason then try to cancel it soon after mount,
hopefully before it goes ro.
Another thing you could try is mounting with nospace_cache. This is a
coin toss if it will matter, but the fact it's not able to create
pending bg's makes me wonder if possibly something is awry with the on
disk free space cache, and this would eliminate that possibility
without having to clear the cache. There's a performance penalty with
nospace_cache but that's the least of the issues right now.
--
Chris Murphy
next prev parent reply other threads:[~2018-03-16 16:44 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-15 18:58 Crashes running btrfs scrub Mike Stevens
2018-03-15 20:32 ` waxhead
2018-03-15 21:07 ` Mike Stevens
2018-03-15 21:22 ` Chris Murphy
[not found] ` <6b4f2b33edb44f1ea8cef47ae68960af@MOXDE7.na.bayer.cnb>
2018-03-16 16:00 ` Chris Murphy
2018-03-16 16:17 ` Mike Stevens
2018-03-16 16:44 ` Chris Murphy [this message]
2018-03-16 18:53 ` Mike Stevens
2018-03-18 2:23 ` Qu Wenruo
2018-03-16 21:39 ` Liu Bo
2018-03-16 21:46 ` Mike Stevens
2018-03-18 0:26 ` Liu Bo
2018-03-18 6:41 ` Liu Bo
2018-03-18 7:57 ` Goffredo Baroncelli
2018-03-18 14:46 ` Goffredo Baroncelli
2018-03-18 22:52 ` waxhead
2018-03-19 1:51 ` Qu Wenruo
2018-03-19 18:06 ` Liu Bo
2018-03-20 17:44 ` Mike Stevens
2018-03-21 2:01 ` Qu Wenruo
2018-03-21 17:13 ` Liu Bo
2018-03-22 0:08 ` Qu Wenruo
2018-03-20 20:04 ` Goffredo Baroncelli
2018-03-15 21:15 ` Chris Murphy
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='CAJCQCtSW4RxSAPjVC5yZLAjb5WUMDV+8=6Bdt4aUWDhXBuZa5Q@mail.gmail.com' \
--to=lists@colorremedies.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=michael.stevens@bayer.com \
--cc=quwenruo.btrfs@gmx.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).