diff mbox

btrfs-progs: check, add verbosity level option

Message ID 1412614138-32008-1-git-send-email-dsterba@suse.cz (mailing list archive)
State Not Applicable
Headers show

Commit Message

David Sterba Oct. 6, 2014, 4:48 p.m. UTC
Signed-off-by: David Sterba <dsterba@suse.cz>
---
 Documentation/btrfs-check.txt | 2 ++
 cmds-check.c                  | 7 ++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/Documentation/btrfs-check.txt b/Documentation/btrfs-check.txt
index 8a8073f52fad..589466e0a3f3 100644
--- a/Documentation/btrfs-check.txt
+++ b/Documentation/btrfs-check.txt
@@ -32,6 +32,8 @@  create a new CRC tree.
 create a new extent tree.
 --check-data-csum::
 verify checkums of data blocks.
+--verbose::
+increase verbosity level.
 
 EXIT STATUS
 -----------
diff --git a/cmds-check.c b/cmds-check.c
index af1940a3fe38..6f3dc77171c4 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -55,6 +55,7 @@  static int repair = 0;
 static int no_holes = 0;
 static int init_extent_tree = 0;
 static int check_data_csum = 0;
+static int verbose = 0;
 
 struct extent_backref {
 	struct list_head list;
@@ -6801,6 +6802,7 @@  const char * const cmd_check_usage[] = {
 	"--check-data-csum           verify checkums of data blocks",
 	"--qgroup-report             print a report on qgroup consistency",
 	"--subvol-extents            print subvolume extents and sharing state",
+	"--verbose                   increase verbosity level",
 	NULL
 };
 
@@ -6822,7 +6824,7 @@  int cmd_check(int argc, char **argv)
 
 	while(1) {
 		int c;
-		c = getopt_long(argc, argv, "as:b", long_options,
+		c = getopt_long(argc, argv, "as:bv", long_options,
 				&option_index);
 		if (c < 0)
 			break;
@@ -6849,6 +6851,9 @@  int cmd_check(int argc, char **argv)
 			case 'E':
 				subvolid = arg_strtou64(optarg);
 				break;
+			case 'v':
+				verbose++;
+				break;
 			case '?':
 			case 'h':
 				usage(cmd_check_usage);