From patchwork Mon Sep 1 01:47:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gui Hecheng X-Patchwork-Id: 4815811 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 A8DA09F375 for ; Mon, 1 Sep 2014 01:48:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DC4B520107 for ; Mon, 1 Sep 2014 01:48:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DF82A200FF for ; Mon, 1 Sep 2014 01:48:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752039AbaIABsR (ORCPT ); Sun, 31 Aug 2014 21:48:17 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:23003 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751569AbaIABsR (ORCPT ); Sun, 31 Aug 2014 21:48:17 -0400 X-IronPort-AV: E=Sophos;i="5.04,439,1406563200"; d="scan'208";a="35316943" Received: from unknown (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 01 Sep 2014 09:45:20 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id s811mCM8027322; Mon, 1 Sep 2014 09:48:12 +0800 Received: from localhost.localdomain (10.167.226.111) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.181.6; Mon, 1 Sep 2014 09:48:18 +0800 From: Gui Hecheng To: CC: , Gui Hecheng Subject: [PATCH] btrfs-progs: move debug info to verbose mode for restore Date: Mon, 1 Sep 2014 09:47:33 +0800 Message-ID: <1409536053-10457-1-git-send-email-guihc.fnst@cn.fujitsu.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <20140829144937.GE31801@twin.jikos.cz> References: <20140829144937.GE31801@twin.jikos.cz> MIME-Version: 1.0 X-Originating-IP: [10.167.226.111] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 The restore tool should only print info of the restoring process in verbose mode with -v option specified. Signed-off-by: Gui Hecheng --- cmds-restore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds-restore.c b/cmds-restore.c index e9ec472..f909429 100644 --- a/cmds-restore.c +++ b/cmds-restore.c @@ -310,7 +310,7 @@ static int copy_one_extent(struct btrfs_root *root, int fd, if (compress == BTRFS_COMPRESS_NONE) bytenr += offset; - if (offset) + if (verbose && offset) printf("offset is %Lu\n", offset); /* we found a hole */ if (disk_size == 0)