From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
To: dsterba@suse.cz, Lukas Straub <lukasstraub2@web.de>,
Josef Bacik <josef@toxicpanda.com>,
linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH][RFC] btrfs: introduce rescue=onlyfs
Date: Wed, 1 Jul 2020 22:05:43 -0400 [thread overview]
Message-ID: <20200702020543.GZ10769@hungrycats.org> (raw)
In-Reply-To: <20200701153919.GD27795@twin.jikos.cz>
On Wed, Jul 01, 2020 at 05:39:19PM +0200, David Sterba wrote:
> On Wed, Jul 01, 2020 at 05:22:18PM +0200, Lukas Straub wrote:
> > On Wed, 1 Jul 2020 10:44:38 -0400
> > Josef Bacik <josef@toxicpanda.com> wrote:
> >
> > > One of the things that came up consistently in talking with Fedora about
> > > switching to btrfs as default is that btrfs is particularly vulnerable
> > > to metadata corruption. If any of the core global roots are corrupted,
> > > the fs is unmountable and fsck can't usually do anything for you without
> > > some special options.
> > >
> > > Qu addressed this sort of with rescue=skipbg, but that's poorly named as
> > > what it really does is just allow you to operate without an extent root.
> > > However there are a lot of other roots, and I'd rather not have to do
> > >
> > > mount -o rescue=skipbg,rescue=nocsum,rescue=nofreespacetree,rescue=blah
> > >
> > > Instead take his original idea and modify it so it just works for
> > > everything. Turn it into rescue=onlyfs, and then any major root we fail
> > > to read just gets left empty and we carry on.
> > >
> > > Obviously if the fs roots are screwed then the user is in trouble, but
> > > otherwise this makes it much easier to pull stuff off the disk without
> > > needing our special rescue tools. I tested this with my TEST_DEV that
> > > had a bunch of data on it by corrupting the csum tree and then reading
> > > files off the disk.
> > >
> > > Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> > > ---
> > >
> > > I'm not married to the rescue=onlyfs name, if we can think of something better
> > > I'm good.
> >
> > Maybe you could go a step further and automatically switch to rescue
> > mode if something is corrupt. This is easier for the user than having
> > to remember the mount flags.
>
> We don't want to do the auto-switching in general as it's a non-standard
> situation. It's better to get user attention than to silently mount
> with limited capabilities and then let the user find out that something
> went wrong, eg. system services randomly failing to start or work.
To be fair, auto-switching is almost exactly what happens now, with mounts
being the exception. If the tree corruption is detected after mounting,
we panic and flip the RO bit right in the middle of the work day.
When mounting with default options and a tree error detected during the
mount, we fail to mount at all--IMHO that's the non-standard situation.
next prev parent reply other threads:[~2020-07-02 2:05 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-01 14:44 [PATCH][RFC] btrfs: introduce rescue=onlyfs Josef Bacik
2020-07-01 15:22 ` Lukas Straub
2020-07-01 15:39 ` David Sterba
2020-07-01 15:51 ` Josef Bacik
2020-07-01 19:16 ` Alberto Bursi
2020-07-03 9:16 ` David Sterba
2020-07-02 2:05 ` Zygo Blaxell [this message]
2020-07-01 19:43 ` waxhead
2020-07-01 19:45 ` waxhead
2020-07-01 19:53 ` Josef Bacik
2020-07-01 21:17 ` Hans van Kranenburg
2020-07-02 3:09 ` Qu Wenruo
2020-07-02 15:28 ` Josef Bacik
2020-07-02 23:36 ` Qu Wenruo
2020-07-03 0:09 ` Neal Gompa
2020-07-02 3:30 ` Zygo Blaxell
2020-07-02 15:35 ` Josef Bacik
2020-07-02 21:10 ` Zygo Blaxell
2020-07-03 9:43 ` David Sterba
2020-07-03 9:47 ` David Sterba
2020-07-02 0:30 ` Qu Wenruo
2020-07-07 15:16 ` David Sterba
2020-07-07 16:25 ` waxhead
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=20200702020543.GZ10769@hungrycats.org \
--to=ce3g8jdj@umail.furryterror.org \
--cc=dsterba@suse.cz \
--cc=josef@toxicpanda.com \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=lukasstraub2@web.de \
/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