From patchwork Mon Oct 6 16:48:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 5038721 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DAE949F2F1 for ; Mon, 6 Oct 2014 16:49:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 102CE2013A for ; Mon, 6 Oct 2014 16:49:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E3C1D2010B for ; Mon, 6 Oct 2014 16:49:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751624AbaJFQtI (ORCPT ); Mon, 6 Oct 2014 12:49:08 -0400 Received: from cantor2.suse.de ([195.135.220.15]:56515 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751289AbaJFQtG (ORCPT ); Mon, 6 Oct 2014 12:49:06 -0400 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 6CDAAAD55 for ; Mon, 6 Oct 2014 16:49:05 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 349FCDA83B; Mon, 6 Oct 2014 18:49:05 +0200 (CEST) From: David Sterba To: linux-btrfs@vger.kernel.org Cc: David Sterba Subject: [PATCH] btrfs-progs: check, add verbosity level option Date: Mon, 6 Oct 2014 18:48:58 +0200 Message-Id: <1412614138-32008-1-git-send-email-dsterba@suse.cz> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1412172669-1975-1-git-send-email-jbacik@fb.com> References: <1412172669-1975-1-git-send-email-jbacik@fb.com> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: David Sterba --- Documentation/btrfs-check.txt | 2 ++ cmds-check.c | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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);