All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukas Straub <lukasstraub2@web.de>
To: Josef Bacik <josef@toxicpanda.com>
Cc: linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH][RFC] btrfs: introduce rescue=onlyfs
Date: Wed, 1 Jul 2020 17:22:18 +0200	[thread overview]
Message-ID: <20200701172218.01c0197d@luklap> (raw)
In-Reply-To: <20200701144438.7613-1-josef@toxicpanda.com>

[-- Attachment #1: Type: text/plain, Size: 2119 bytes --]

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.

Regards,
Lukas Straub

> Also rescue=skipbg is currently only sitting in misc-next, which is why I'm
> killing it with this patch, we haven't sent it upstream so we're good to change
> it now before it lands.
> 
>  fs/btrfs/block-group.c |  2 +-
>  fs/btrfs/ctree.h       |  2 +-
>  fs/btrfs/disk-io.c     | 76 ++++++++++++++++++++++--------------------
>  fs/btrfs/inode.c       |  6 +++-
>  fs/btrfs/super.c       | 27 +++++++--------
>  fs/btrfs/volumes.c     |  4 +--
>  6 files changed, 63 insertions(+), 54 deletions(-)
> ...

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-07-01 15:22 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 [this message]
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
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=20200701172218.01c0197d@luklap \
    --to=lukasstraub2@web.de \
    --cc=josef@toxicpanda.com \
    --cc=kernel-team@fb.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.