From patchwork Mon Sep 17 07:28:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Su Yue X-Patchwork-Id: 10602127 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D62EC1508 for ; Mon, 17 Sep 2018 07:22:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE9FA29605 for ; Mon, 17 Sep 2018 07:22:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B36AE2960B; Mon, 17 Sep 2018 07:22:13 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 24BC329605 for ; Mon, 17 Sep 2018 07:22:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728212AbeIQMsS (ORCPT ); Mon, 17 Sep 2018 08:48:18 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:17617 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728291AbeIQMsS (ORCPT ); Mon, 17 Sep 2018 08:48:18 -0400 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="44983912" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 17 Sep 2018 15:22:06 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (unknown [10.167.33.85]) by cn.fujitsu.com (Postfix) with ESMTP id A16154B6EC9A for ; Mon, 17 Sep 2018 15:22:03 +0800 (CST) Received: from archlinux.g08.fujitsu.local (10.167.226.31) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 17 Sep 2018 15:22:05 +0800 From: Su Yue To: CC: Subject: [PATCH v3 7/7] btrfs-progs: fsck-tests: add test case inode_extref without dir_item and dir_index Date: Mon, 17 Sep 2018 15:28:52 +0800 Message-ID: <20180917072852.25831-8-suy.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180917072852.25831-1-suy.fnst@cn.fujitsu.com> References: <20180917072852.25831-1-suy.fnst@cn.fujitsu.com> MIME-Version: 1.0 X-Originating-IP: [10.167.226.31] X-yoursite-MailScanner-ID: A16154B6EC9A.AC023 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: suy.fnst@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 Inode 257 is only with inode_extref without inode_ref. And This case contains an inode_extref: ========================================== ... item 1 key (257 INODE_EXTREF 3460996356) itemoff 3947 itemsize 24 index 257 parent 256 namelen 6 name: foo255 ... ========================================== The related dir_item and dir_index are missing. Add the case to ensure both original and lowmem mode check can handle the case of inode_extref. Lowmem part is supported since patch named 'btrfs-progs: lowmem: optimization and repair for check_inode_extref()'. Rename default_case.img to inode_ref_without_dir_item_and_index.img. Signed-off-by: Su Yue --- .../inode_extref_without_dir_item_and_index.img | Bin 0 -> 4096 bytes ... => inode_ref_without_dir_item_and_index.img} | Bin 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/fsck-tests/009-no-dir-item-or-index/inode_extref_without_dir_item_and_index.img rename tests/fsck-tests/009-no-dir-item-or-index/{default_case.img => inode_ref_without_dir_item_and_index.img} (100%) diff --git a/tests/fsck-tests/009-no-dir-item-or-index/inode_extref_without_dir_item_and_index.img b/tests/fsck-tests/009-no-dir-item-or-index/inode_extref_without_dir_item_and_index.img new file mode 100644 index 0000000000000000000000000000000000000000..769dabe9bdeff9b9582a49b6de9a7ff14be9b389 GIT binary patch literal 4096 zcmeHJeKgeBAO4OpjF(}�)d7VKBADZ0yK17=|%Q8B2-Kcpp@RG?l?%nb9C`8B}DJ zyro1NiA>(MvKp;QDlA3VijWBNV_(kso&B|c|MrjWx#zjhz31F}?(^Jpp3glUm>V&o z@7WCe*<{v6(C>YX%&afM;p+%IU59x3Is(<}z;Iqiz({%xivQphQfnL!U)v7=7uVrS z`{KYC2mZ|tum%bn2b!}%$_;S$Taiz+ecOBf6xfaFr&DBn03%w zkPPF%J;*=`PgWr6lY(ZzHs6D0Ymhs5x|j_XzRhLdGv2 z^fe#EOw^`7O`e#~gt2;GtH>5lOv>qQHP3%5}dDM&a;^p8g5T^#>-PhI0Qt< zP*)`4K@aO+ah{Bv2|*2#VB~Bk@~AO+)J!^llLl(HA2sWMLHX`*Z_l@+cmpf?TgUkN zK67z_-BlwH1$2{?^dNm&Q!n+T=UY?858db24|H40q{}2MYv9@9*GmNO#&FCv)_9HC zsv|7_QQF&Yol%NXQjDWiuBos$*GXGB|3q%ha@mb%?^kc@J*Ts~=>;1czG;IY+Omo` z7&(VAIWV}rKQBg65mc_qFluvj>?6^8V;lI@UF#(~02IJ18djSmV zUriED#qnuqyZv9)xHV1;4_WPbmgh;DE$t!(YJ(|KV8Sdyu0VETi)!dbp9RP;{sE}! zM0g7zC0x{8Ba47FB3teSY8iN8JGV*#oPPFLUK6(BtF_~E!eF3(5VnQRX2HePT8_+2zIhTBvtRv4`CxO{>V=(Nl^!EMrd&mD4w^MR?5UBKvi^Yxp0h4(x0T{ zt4zmqi^4~%w~d-sB+>_ev|q_JbhuQm@l35~_NNO)F$W1_(M(qZ5{R$f~k3B}#qLX{oxBbW~o;NB09+&&F1N8J5qLHdWW9k}3Klg%HIwuAx}W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am|2mQZ(hrt95b zmj7x_Pe}CnT(w>k!D>zI4DuEK;@4TaAIQDWZI7LzwP^48{Y_!O#I~)D|K^|Qm%IHx G9QY4={DzYN literal 0 HcmV?d00001 diff --git a/tests/fsck-tests/009-no-dir-item-or-index/default_case.img b/tests/fsck-tests/009-no-dir-item-or-index/inode_ref_without_dir_item_and_index.img similarity index 100% rename from tests/fsck-tests/009-no-dir-item-or-index/default_case.img rename to tests/fsck-tests/009-no-dir-item-or-index/inode_ref_without_dir_item_and_index.img