From patchwork Wed Nov 22 06:52:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gu Jinxiang X-Patchwork-Id: 10069837 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 3124F60375 for ; Wed, 22 Nov 2017 06:53:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2360D29BB6 for ; Wed, 22 Nov 2017 06:53:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1814329BBA; Wed, 22 Nov 2017 06:53:08 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9EC6429BB6 for ; Wed, 22 Nov 2017 06:53:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751305AbdKVGxE (ORCPT ); Wed, 22 Nov 2017 01:53:04 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:17746 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751216AbdKVGxE (ORCPT ); Wed, 22 Nov 2017 01:53:04 -0500 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="30366948" Received: from bogon (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 22 Nov 2017 14:53:01 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (unknown [10.167.33.85]) by cn.fujitsu.com (Postfix) with ESMTP id 085E6482D01B for ; Wed, 22 Nov 2017 14:52:58 +0800 (CST) Received: from localhost.localdomain (10.167.226.132) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 22 Nov 2017 14:52:57 +0800 From: Gu Jinxiang To: Subject: [PATCH] btrfs-progs: Allow to open filesystem with some broken tree roots Date: Wed, 22 Nov 2017 14:52:53 +0800 Message-ID: <1511333573-10807-1-git-send-email-gujx@cn.fujitsu.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.167.226.132] X-yoursite-MailScanner-ID: 085E6482D01B.A7FA1 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: gujx@cn.fujitsu.com Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Repair the miss modify in commit 8698a2b9ba89 ("btrfs-progs: Allow inspect dump-tree to show specified tree block even some tree roots are corrupted") Due to above modify, the decompressed file of tests/fuzz-tests/images/bko-172811.raw.xz can not be open by btrfs-debug-tree, because the csum tree's bytenr is not correct. Signed-off-by: Gu Jinxiang --- cmds-inspect-dump-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds-inspect-dump-tree.c b/cmds-inspect-dump-tree.c index 4e72c08a..9ae4eb23 100644 --- a/cmds-inspect-dump-tree.c +++ b/cmds-inspect-dump-tree.c @@ -219,7 +219,7 @@ int cmd_inspect_dump_tree(int argc, char **argv) int uuid_tree_only = 0; int roots_only = 0; int root_backups = 0; - unsigned open_ctree_flags = OPEN_CTREE_FS_PARTIAL; + unsigned open_ctree_flags = OPEN_CTREE_PARTIAL; u64 block_only = 0; struct btrfs_root *tree_root_scan; u64 tree_id = 0;