Re: [PATCH][v2] btrfs: introduce rescue=onlyfs

David Sterba
2020-07-21T17:16:57Z

On Tue, Jul 21, 2020 at 04:56:55PM +0100, Graham Cobb wrote:
> On 21/07/2020 16:10, Josef Bacik 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.
>
> Am I the only one who dislikes the name? "onlyfs" does not seem at all
> meaningful to me, as a system manager - the people it is apparently
> aimed at. I really don't understand what it is supposed to mean and it
> sounds like some developer debugging option or something.

No, you're not the only one. Changelog points to 'skipbg' as poor naming
choice but 'onlyfs' is IMHO just as bad because it's supposed to be used
by users so the naming need to take that into account.

> If it means "only filesystem" that doesn't make sense to me - the whole
> thing is the filesystem. I guess "only data" might be more meaningful
> but if the aim is to turn on as much recovery as possible to help the
> user to save their data then why not just say so?
>
> Something like "rescue=max", "rescue=recoverymode", "rescue=dataonly",
> "rescue=ignoreallerrors" or "rescue=emergency" might be more meaningful.

From user perspective the option should have a high level semantics,
like you suggest above. We should add individual options to try to work
around specific damage if not just for testing purposes, having more
flexibility is a good thing.