From: David Sterba <dsterba@suse.cz>
To: Johannes Thumshirn <jthumshirn@suse.de>
Cc: dsterba@suse.cz, David Sterba <dsterba@suse.com>,
Nikolay Borisov <nborisov@suse.com>,
quwenruo.btrfs@gmx.com, anand.jain@oracle.com, rbrown@suse.de,
Linux BTRFS Mailinglist <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] btrfs-progs: warn users about the possible dangers of check --repair
Date: Tue, 22 Oct 2019 14:19:29 +0200 [thread overview]
Message-ID: <20191022121929.GU3001@twin.jikos.cz> (raw)
In-Reply-To: <45385205-4b42-b89b-4c6f-581064c5f08c@suse.de>
On Tue, Oct 22, 2019 at 09:33:06AM +0200, Johannes Thumshirn wrote:
> On 21/10/2019 17:22, David Sterba wrote:
> > --force was added for a different reason, to allow check on a mounted
> > filesystem. I don't think that combining --repair and --force just to
> > allow repair is a good idea. There's a 'dangerous repair' mode for eg.
> > xfs that allows to do live surgery on a mounted filesytem (followed by
> > immediate reboot). We want to be able to do that eventually.
> >
> > I understand where the motivation comes from, let me have a second
> > thought on that.
>
> So how about adding a '--yes' or '--accept', '--dangerous',
> '--allow-dangeruos' parameter instead of force to skip the warning?
>
> My vote would go for '--allow-dangerous'.
So, I agree with the above. The dangerous repair should be something
almost nobody does or should do, so a very long option name is just
fine. This leaves -f for --repair to skip the warning. We now have:
* btrfs check - read-only by default, no changes
* btrfs check --read-only - same as above, explicit about RO
* btrfs check --repair - warning with a timeout, then repair
* btrfs check --repair -f - no warning (or the warning could be still
printed but without timeout)
I'd rather avoid options that would be confusing to what are they
referring to. So '--yes' it's like don't ask questions before repairing,
that's what e2fsck does but that's different from the initial warning.
And so on.
The dangerous repair would need a full set of the options, so
* btrfs --repair -f --allow-dangerous
next prev parent reply other threads:[~2019-10-22 12:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-18 11:16 [PATCH v2 1/2] btrfs-progs: warn users about the possible dangers of check --repair Johannes Thumshirn
2019-10-18 11:16 ` [PATCH v2 2/2] btrfs-progs: docs: fix warning test Johannes Thumshirn
2019-10-21 15:22 ` [PATCH v2 1/2] btrfs-progs: warn users about the possible dangers of check --repair David Sterba
2019-10-22 7:33 ` Johannes Thumshirn
2019-10-22 7:37 ` Qu Wenruo
2019-10-22 7:45 ` Johannes Thumshirn
2019-10-22 7:50 ` Nikolay Borisov
2019-10-22 12:19 ` David Sterba [this message]
2019-11-15 12:53 ` David Sterba
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=20191022121929.GU3001@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=anand.jain@oracle.com \
--cc=dsterba@suse.com \
--cc=jthumshirn@suse.de \
--cc=linux-btrfs@vger.kernel.org \
--cc=nborisov@suse.com \
--cc=quwenruo.btrfs@gmx.com \
--cc=rbrown@suse.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;
as well as URLs for NNTP newsgroup(s).