From: Anand Jain <anand.jain@oracle.com>
To: dsterba@suse.cz, linux-btrfs@vger.kernel.org
Subject: Re: [RFC PATCH 0/3] btrfs-progs: make quiet to overrule verbose
Date: Mon, 4 Nov 2019 14:26:48 +0800 [thread overview]
Message-ID: <cc5d4ad7-04c3-c752-65d0-3997a101e4b4@oracle.com> (raw)
In-Reply-To: <20191101151815.GV3001@twin.jikos.cz>
On 11/1/19 11:18 PM, David Sterba wrote:
> On Wed, Oct 30, 2019 at 03:42:56AM +0800, Anand Jain wrote:
>>>>> Question: command -v -q -v should be equal to command -v, right?
>>>>
>>>> No, that would be equivalent to the default level:
>>>>
>>>> verbose starts with 1 ()
>>>> verbose++ (-v)
>>>> verbose = 0 (-q)
>>>> verbose++ is now 1, which is not -v ()
>>>>
>>>
>>> Oh I was thinking its a bug, and no need to carry forward to the global
>>> verbose. Will make it look like this.
>>
>> What do you think should be the final %verbose value when both
>> local and global verbose and or quiet options are specified?
>>
>> For example:
>> btrfs -v -q sub-command -v
>> btrfs -q sub-command -v
>> btrfs -vv sub-command -q
>> etc..
>
> Ah that's the conflicting part.
> I'd say treat all -v and -q equal,
Umm I don't understand what is treating equal here.
The sub-command already treats differently under sub-command options.
As shown below.
case 'v':
bconf.verbose++;
break;
case 'q':
bconf.verbose = 0;
break;
> so
> modify the bconf.verbose variable, and it's straightforward to document.
> Some time in the future we should also issue a warning for 'sub-command
> -v'.
I am guessing you mean:- Warning option is deprecated ?
> The order makes it unintuitive so
>
> btrfs -q command -v
>
> is going to be the default verbosity.
default verbosity is 0? 1 ?
As of now in send/receive default verbosity is 1. And rest
of the sub-commands its 0.
And as the -v is last to appear the command will be
equivalent to 'btrfs sub-command -q -v' which is verbosity level 1.
I hope this is reasonable.
> We can't ignore the sub-command
> part, and making it conditionally work in case there's no global
> verbosity setting is kind of complicating it.
Umm. As of now in v1.1, the sub-command continues to operate on the
global bconf.verbose values, which works very well. Please see v1.1
in the ML.
> So let's take the simple approach, maybe we'll have second thought on
> that before release.
>
Sure. To simplify the discussion, in v1.1 cover-letter I have included
verbosity implementation code sample, hope this helps.
verbosity code sample as in v1.1
Thanks, Anand
prev parent reply other threads:[~2019-11-04 6:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-24 6:28 [RFC PATCH 0/3] btrfs-progs: make quiet to overrule verbose Anand Jain
2019-10-24 6:28 ` [RFC PATCH 1/3] btrfs-progs: send: let option quiet " Anand Jain
2019-10-24 6:28 ` [RFC PATCH 2/3] btrfs-progs: receive: " Anand Jain
2019-10-24 6:28 ` [RFC PATCH 3/3] btrfs-progs: receive: make quiet really quiet Anand Jain
2019-10-24 15:41 ` [RFC PATCH 0/3] btrfs-progs: make quiet to overrule verbose David Sterba
2019-10-24 23:51 ` Anand Jain
2019-10-25 1:56 ` Anand Jain
2019-10-25 16:35 ` David Sterba
2019-10-26 1:01 ` Anand Jain
2019-10-29 19:42 ` Anand Jain
2019-11-01 15:18 ` David Sterba
2019-11-04 6:26 ` Anand Jain [this message]
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=cc5d4ad7-04c3-c752-65d0-3997a101e4b4@oracle.com \
--to=anand.jain@oracle.com \
--cc=dsterba@suse.cz \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox