public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: dsterba@suse.cz, Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v3 2/3] btrfs: Introduce "rescue=" mount option
Date: Thu, 13 Jun 2019 09:30:01 +0800	[thread overview]
Message-ID: <4c6ed328-1fc6-610f-e63e-4ce45a605f99@gmx.com> (raw)
In-Reply-To: <20190612150910.GP3563@twin.jikos.cz>


[-- Attachment #1.1: Type: text/plain, Size: 2673 bytes --]



On 2019/6/12 下午11:09, David Sterba wrote:
> 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

The problem is, every time I see things like usebackuproot or
nologreplay, it's not that easy to understand them just by a quick glance.
Further more, they are already rescue options, not something we would
need to use in a daily basis.

A little longer but easier to read looks valid to me in such use case.

Thanks,
Qu

> 
> 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.
> 


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

  reply	other threads:[~2019-06-13 16:56 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
2019-06-13  1:30     ` Qu Wenruo [this message]
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=4c6ed328-1fc6-610f-e63e-4ce45a605f99@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=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