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