public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v3 2/3] btrfs: Introduce "rescue=" mount option
Date: Wed, 12 Jun 2019 17:09:10 +0200	[thread overview]
Message-ID: <20190612150910.GP3563@twin.jikos.cz> (raw)
In-Reply-To: <20190612063657.21063-3-wqu@suse.com>

On Wed, Jun 12, 2019 at 02:36:56PM +0800, Qu Wenruo wrote:
> This patch introduces a new "rescue=" mount option for all those mount
> options for data recovery.
> 
> Different rescue sub options are seperated by ':'. E.g
> "ro,rescue=no_log_replay:use_backup_root".
> (The original plan is to use ';', but ';' needs to be escaped/quoted,
> or it will be interpreted by bash)

':' as separator is fine

> The following mount options are converted to "rescue=", old mount
> options are deprecated but still available for compatibility purpose:
> 
> - usebackuproot
>   Now it's "rescue=use_backup_root"
> 
> - nologreplay
>   Now it's "rescue=no_log_replay"
> 
> The new underscore is here to make the option more readable and make
> spell check happier.

Who uses spell checker on mount options, really? I'd expect that the new
syntax would build on top of the old so the exact same names of the
options are now shifted to the value of 'rescue='.

The usability is better with switching

  -o usebackuproot

to

  -o rescue=usebackuproot

ie. just prepending 'rescue='.

> Signed-off-by: Qu Wenruo <wqu@suse.com>
> ---
>  fs/btrfs/super.c | 65 +++++++++++++++++++++++++++++++++++++++++++++---
>  1 file changed, 62 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
> index 64f20725615a..4512f25dcf69 100644
> --- a/fs/btrfs/super.c
> +++ b/fs/btrfs/super.c
> @@ -310,7 +310,6 @@ enum {
>  	Opt_datasum, Opt_nodatasum,
>  	Opt_defrag, Opt_nodefrag,
>  	Opt_discard, Opt_nodiscard,
> -	Opt_nologreplay,
>  	Opt_ratio,
>  	Opt_rescan_uuid_tree,
>  	Opt_skip_balance,
> @@ -323,7 +322,6 @@ enum {
>  	Opt_subvolid,
>  	Opt_thread_pool,
>  	Opt_treelog, Opt_notreelog,
> -	Opt_usebackuproot,
>  	Opt_user_subvol_rm_allowed,
>  
>  	/* Deprecated options */
> @@ -341,6 +339,8 @@ enum {
>  #ifdef CONFIG_BTRFS_FS_REF_VERIFY
>  	Opt_ref_verify,
>  #endif
> +	/* Rescue options */
> +	Opt_rescue, Opt_usebackuproot, Opt_nologreplay,

The options have been sorted and grouped, don't mess it up again please.
Check the list and find a better place than after the deprecated and
debugging options.

  reply	other threads:[~2019-06-12 15:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-12  6:36 [PATCH v3 0/3] btrfs: Introduce new rescue= mount options Qu Wenruo
2019-06-12  6:36 ` [PATCH v3 1/3] btrfs: Remove "recovery" mount option Qu Wenruo
2019-06-12 14:58   ` David Sterba
2019-06-13  1:25     ` Qu Wenruo
2019-06-12  6:36 ` [PATCH v3 2/3] btrfs: Introduce "rescue=" " Qu Wenruo
2019-06-12 15:09   ` David Sterba [this message]
2019-06-13  1:30     ` Qu Wenruo
2019-07-25  6:15       ` Qu Wenruo
2019-06-12  6:36 ` [PATCH v3 3/3] btrfs: Introduce new mount option to skip block group items scan Qu Wenruo
2019-06-12 15:10   ` 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=20190612150910.GP3563@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.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