All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: linux-btrfs@vger.kernel.org
Subject: [RFC PATCH 00/14] btrfs-progs: global-verbose option
Date: Mon, 21 Oct 2019 18:01:08 +0800	[thread overview]
Message-ID: <1571652082-25982-1-git-send-email-anand.jain@oracle.com> (raw)

This patch set brings --verbose option to the top level btrfs command,
such as 'btrfs --verbose'. With this we don't have to add or remember
verbose option at the sub-commands level.

As there are already verbose options to 11 sub-commands as listed
below [1][2]. So the top level --verbose option here takes care to transpire
verbose request from the top level to the sub-command level for 9 (not 11)
sub-commands as in [1] as of now.

This patch is RFC still for the following two reasons (comments appreciated).

1.
The sub-commands as in [2] uses multi-level compile time verbose option,
such as %g_verbose = 0 (quite), %g_verbose = 1 (default), %g_verbose > 1
(real-verbose). And verbose at default is also part the .out files in
fstests. So it needs further discussions on how to handle the multi-
level verbose option using the global verbose option, and so sub-
commands in [2] are untouched.

2.
These patch has been unit-tested individually.
These patches does not alter the verbose output.
But it fixes the indentation in the command's help output, which may be
used in fstests and btrfs-progs/tests and their verification is pending
still, which I am planning to do it before v1.

[1]
btrfs subvolume delete --help
        -v|--verbose           verbose output of operations
btrfs filesystem defragment --help
        -v                  be verbose
btrfs balance start --help
        -v|--verbose        be verbose
btrfs balance status --help
        -v|--verbose        be verbose
btrfs rescue chunk-recover --help
        -v      Verbose mode
btrfs rescue super-recover --help
        -v      Verbose mode
btrfs restore --help
        -v|--verbose         verbose
btrfs inspect-internal inode-resolve --help
        -v   verbose mode
btrfs inspect-internal logical-resolve --help
        -v          verbose mode

[2]
btrfs send --help
        -v|--verbose     enable verbose output to stderr, each occurrence of
btrfs receive --help
        -v               increase verbosity about performed action

Anand Jain (14):
  btrfs-progs: add global verbose helper functions
  btrfs-progs: migrate subvolume delete to global verbose
  btrfs-progs: migrate filesystem defragment to global verbose
  btrfs-progs: migrate btrfs balance start to global verbose
  btrfs-progs: migrate balance status to global verbose
  btrfs-progs: fix help, show long option in balance start and status
  btrfs-progs: migrate rescue chunk-recover to global verbose
  btrfs-progs: migrate rescue super-recover to global verbose
  btrfs-progs: restore: delete unreachable code
  btrfs-progs: migrate restore to global verbose
  btrfs-progs: migrate inspect-internal inode-resolve to global verbose
  btrfs-progs: migrate inspect-internal logical-resolve to global
    verbose
  btrfs-progs: refactor btrfs_scan_devices() to accept verbose argument
  btrfs-progs: enable verbose for btrfs device scan

 btrfs.c              | 12 ++++++--
 cmds/balance.c       | 29 +++++++++---------
 cmds/device.c        |  2 +-
 cmds/filesystem.c    | 27 ++++++++---------
 cmds/inspect.c       | 36 +++++++++++-----------
 cmds/rescue.c        | 22 +++++++-------
 cmds/restore.c       | 86 +++++++++++++++++++++-------------------------------
 cmds/subvolume.c     | 35 +++++++++++----------
 common/device-scan.c |  4 ++-
 common/device-scan.h |  2 +-
 common/help.h        |  8 +++++
 common/messages.c    | 19 ++++++++++++
 common/messages.h    |  5 +++
 common/utils.c       |  2 +-
 disk-io.c            |  2 +-
 15 files changed, 155 insertions(+), 136 deletions(-)

-- 
1.8.3.1


             reply	other threads:[~2019-10-21 10:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-21 10:01 Anand Jain [this message]
2019-10-21 10:01 ` [RFC PATCH 01/14] btrfs-progs: add global verbose helper functions Anand Jain
2019-10-21 10:01 ` [RFC PATCH 02/14] btrfs-progs: migrate subvolume delete to global verbose Anand Jain
2019-10-21 10:01 ` [RFC PATCH 03/14] btrfs-progs: migrate filesystem defragment " Anand Jain
2019-10-21 10:01 ` [RFC PATCH 04/14] btrfs-progs: migrate btrfs balance start " Anand Jain
2019-10-21 10:01 ` [RFC PATCH 05/14] btrfs-progs: migrate balance status " Anand Jain
2019-10-21 10:01 ` [RFC PATCH 06/14] btrfs-progs: fix help, show long option in balance start and status Anand Jain
2019-10-21 10:01 ` [RFC PATCH 07/14] btrfs-progs: migrate rescue chunk-recover to global verbose Anand Jain
2019-10-21 10:01 ` [RFC PATCH 08/14] btrfs-progs: migrate rescue super-recover " Anand Jain
2019-10-21 10:01 ` [RFC PATCH 09/14] btrfs-progs: restore: delete unreachable code Anand Jain
2019-10-21 10:01 ` [RFC PATCH 10/14] btrfs-progs: migrate restore to global verbose Anand Jain
2019-10-21 10:01 ` [RFC PATCH 11/14] btrfs-progs: migrate inspect-internal inode-resolve " Anand Jain
2019-10-21 10:01 ` [RFC PATCH 12/14] btrfs-progs: migrate inspect-internal logical-resolve " Anand Jain
2019-10-21 10:01 ` [RFC PATCH 13/14] btrfs-progs: refactor btrfs_scan_devices() to accept verbose argument Anand Jain
2019-10-21 10:01 ` [RFC PATCH 14/14] btrfs-progs: enable verbose for btrfs device scan Anand Jain
2019-10-21 16:12 ` [RFC PATCH 00/14] btrfs-progs: global-verbose option David Sterba
2019-10-22  1:54   ` Anand Jain
2019-10-22 11:45     ` 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=1571652082-25982-1-git-send-email-anand.jain@oracle.com \
    --to=anand.jain@oracle.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.