From patchwork Thu Aug 4 15:51:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 9263865 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8C34D6048B for ; Thu, 4 Aug 2016 15:51:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D34E28409 for ; Thu, 4 Aug 2016 15:51:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71DDB2840D; Thu, 4 Aug 2016 15:51:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from oss.sgi.com (oss.sgi.com [192.48.182.195]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A371F28409 for ; Thu, 4 Aug 2016 15:51:19 +0000 (UTC) Received: from oss.sgi.com (localhost [IPv6:::1]) by oss.sgi.com (Postfix) with ESMTP id C6AFD7CA1; Thu, 4 Aug 2016 10:51:18 -0500 (CDT) X-Original-To: xfs@oss.sgi.com Delivered-To: xfs@oss.sgi.com Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (Postfix) with ESMTP id 113527CA0 for ; Thu, 4 Aug 2016 10:51:17 -0500 (CDT) Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by relay2.corp.sgi.com (Postfix) with ESMTP id D620E304051 for ; Thu, 4 Aug 2016 08:51:16 -0700 (PDT) X-ASG-Debug-ID: 1470325873-0bf57c136936d460001-NocioJ Received: from sandeen.net (sandeen.net [63.231.237.45]) by cuda.sgi.com with ESMTP id L2JNGv5kuqgWnkzF for ; Thu, 04 Aug 2016 08:51:13 -0700 (PDT) X-Barracuda-Envelope-From: sandeen@sandeen.net X-Barracuda-Effective-Source-IP: sandeen.net[63.231.237.45] X-Barracuda-Apparent-Source-IP: 63.231.237.45 Received: from [10.0.0.4] (liberator [10.0.0.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTPSA id D2D1C481A for ; Thu, 4 Aug 2016 10:51:12 -0500 (CDT) To: xfs-oss From: Eric Sandeen Subject: [PATCH] xfs_metadump: don't warn about unobfuscated log with -o Message-ID: <541974d2-5877-a7ef-af3c-7d1a47e227c0@sandeen.net> X-ASG-Orig-Subj: [PATCH] xfs_metadump: don't warn about unobfuscated log with -o Date: Thu, 4 Aug 2016 10:51:12 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 X-Barracuda-Connect: sandeen.net[63.231.237.45] X-Barracuda-Start-Time: 1470325873 X-Barracuda-URL: https://192.48.176.15:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 859 X-Virus-Scanned: by bsmtpd at sgi.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.7 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.31748 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-BeenThere: xfs@oss.sgi.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com X-Virus-Scanned: ClamAV using ClamSMTP It makes no sense to warn about un-obfuscated logs when we asked xfs_metadump to not obfuscate metadata: # xfs_metadump -o /dev/loop2 bad.metadump xfs_metadump: Filesystem log is dirty; image will contain unobfuscated metadata in log. Signed-off-by: Eric Sandeen Reviewed-by: Bill O'Donnell diff --git a/db/metadump.c b/db/metadump.c index d7ff6e5..01a51c4 100644 --- a/db/metadump.c +++ b/db/metadump.c @@ -2575,12 +2575,14 @@ copy_log(void) break; case 1: /* keep the dirty log */ - print_warning( + if (obfuscate) + print_warning( _("Filesystem log is dirty; image will contain unobfuscated metadata in log.")); break; case -1: /* log detection error */ - print_warning( + if (obfuscate) + print_warning( _("Could not discern log; image will contain unobfuscated metadata in log.")); break; }