From patchwork Wed Sep 12 20:49:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Su Yue X-Patchwork-Id: 10597463 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 C0975920 for ; Wed, 12 Sep 2018 12:49:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B24B229C69 for ; Wed, 12 Sep 2018 12:49:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A67CF29EA7; Wed, 12 Sep 2018 12:49:48 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 9917B29E96 for ; Wed, 12 Sep 2018 12:49:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726712AbeILRyI (ORCPT ); Wed, 12 Sep 2018 13:54:08 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:38563 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726491AbeILRyI (ORCPT ); Wed, 12 Sep 2018 13:54:08 -0400 Received: by mail-pl1-f195.google.com with SMTP id u11-v6so939039plq.5 for ; Wed, 12 Sep 2018 05:49:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nXB9blXDFZFpJXSNfaNpwCIOg0hmyJyxgIY/jgQNmpU=; b=cttuzMydgmMZl4LVuIrmNJRck4eObHIvtKJvu4zYa+nV1g4tjzbim5S32zeXILn//5 EmjjU0X2UmZ6HYqhezqBw+kfg79eYFzGnnTBBdhXoMJNTdKfB2G0+XoKEPVUNaJYf252 mdR7RRWX6OvAXynAfVGsot4coiqNQTZaAT1rgGPOsK/RQBCnkFyPFkXrUUEtnjDsqU/c F5aP8GPAguuWD8LIlLbmMFtnQtAf3qtF6Wx0YYGWU2dFJelLzT2WxS/iuyM5mMGlv54S y9Czn649lhPQIOXoYiTixlJOFU8Tt94YDZNUgJnHQg1P4JdBiPNAYx92beY0fOq5TOHd kxxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nXB9blXDFZFpJXSNfaNpwCIOg0hmyJyxgIY/jgQNmpU=; b=GOya0bnDjF+oo3bE+n1EXHjync2TE6bEgiiV+hrUfiUNOcxN1XWW05J0t6ZdkJN+1S mMeSLMXu3k9+VnzXcvRgDYtTlVto+VQ0ahyp7Fasz8+gABigAV+jurUYxbjQkTKl5LrD tG8xWyysz1mjYt11VgDedVnn5KI0Z2Gc5jIGDHYWCv6ANV1kLKoo+MhYA4+JkxHAAE8z o8aJE7JZtBxw0p31mCn+/P130p2xFHqUmL3O75uD8473cg0uNz+0wIo7WGtF0SrJNUTM lkzlSDdF/ge14jDX5cWWuh9+HHiYxYlQhhazyk9pPtxGDsrkIsUStBUTLvwLbxY/njm3 p29A== X-Gm-Message-State: APzg51ClWaRkItzw2MwtuoAsKCP7btvY9tdN4pZaw/0t7n48lysfy9XZ +xhenOS5Icb9vTzPDwGtZjFwJc9t X-Google-Smtp-Source: ANB0VdbGSKgb4jVtdMdeJBH3egiRR2r/Vxu1NOk50Ki/+ap9tt/iORz0tVh1QqOkxFwrjbyPtq4MEg== X-Received: by 2002:a17:902:8f8c:: with SMTP id z12-v6mr2113465plo.4.1536756585496; Wed, 12 Sep 2018 05:49:45 -0700 (PDT) Received: from cat-arch.lan (li1862-137.members.linode.com. [172.105.208.137]) by smtp.gmail.com with ESMTPSA id w12-v6sm1739393pfd.110.2018.09.12.05.49.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 05:49:44 -0700 (PDT) From: damenly.su@gmail.com X-Google-Original-From: suy.fnst@cn.fujitsu.com To: linux-btrfs@vger.kernel.org Cc: suy.fnst@cn.fujitsu.com Subject: [PATCH v2 1/7] btrfs-progs: adjust arguments of btrfs_lookup_inode_extref() Date: Wed, 12 Sep 2018 20:49:18 +0000 Message-Id: <20180912204924.10089-2-suy.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180912204924.10089-1-suy.fnst@cn.fujitsu.com> References: <20180912204924.10089-1-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 From: Su Yue The argument index is not used in btrfs_lookup_inode_extref(), so remove it. And adjust positions its arguments to make it consistent with kernel part. No functional change. Fixes: 260675657767 ("btrfs-progs: Import btrfs_insert/del/lookup_extref() functions.") Signed-off-by: Su Yue Reviewed-by: Qu Wenruo --- ctree.h | 6 +++--- inode-item.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ctree.h b/ctree.h index 4719962df67d..e7f6c5df95f1 100644 --- a/ctree.h +++ b/ctree.h @@ -2708,9 +2708,9 @@ int btrfs_lookup_inode(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_key *location, int mod); struct btrfs_inode_extref *btrfs_lookup_inode_extref(struct btrfs_trans_handle - *trans, struct btrfs_path *path, struct btrfs_root *root, - u64 ino, u64 parent_ino, u64 index, const char *name, - int namelen, int ins_len); + *trans, struct btrfs_root *root, struct btrfs_path *path, + const char *name, int namelen, u64 ino, u64 parent_ino, + int ins_len); int btrfs_del_inode_extref(struct btrfs_trans_handle *trans, struct btrfs_root *root, const char *name, int name_len, diff --git a/inode-item.c b/inode-item.c index 1cc106670cd4..461557cb83d6 100644 --- a/inode-item.c +++ b/inode-item.c @@ -228,9 +228,9 @@ static int btrfs_find_name_in_ext_backref(struct btrfs_path *path, } struct btrfs_inode_extref *btrfs_lookup_inode_extref(struct btrfs_trans_handle - *trans, struct btrfs_path *path, struct btrfs_root *root, - u64 ino, u64 parent_ino, u64 index, const char *name, - int namelen, int ins_len) + *trans, struct btrfs_root *root, struct btrfs_path *path, + const char *name, int namelen, u64 ino, u64 parent_ino, + int ins_len) { struct btrfs_key key; struct btrfs_inode_extref *extref; From patchwork Wed Sep 12 20:49:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Su Yue X-Patchwork-Id: 10597465 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 32C8813BF for ; Wed, 12 Sep 2018 12:49:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2465929E96 for ; Wed, 12 Sep 2018 12:49:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 18DFA29EB2; Wed, 12 Sep 2018 12:49:52 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 BE9CC29E96 for ; Wed, 12 Sep 2018 12:49:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726795AbeILRyM (ORCPT ); Wed, 12 Sep 2018 13:54:12 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:34145 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726491AbeILRyM (ORCPT ); Wed, 12 Sep 2018 13:54:12 -0400 Received: by mail-pg1-f195.google.com with SMTP id d19-v6so1029947pgv.1 for ; Wed, 12 Sep 2018 05:49:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2rDzUBiAXq8WeOya5qKO0dSqC2zbQBO5oRNMD/vUpdo=; b=fWf24rg8s3OZihlyU3TFGdUrm11opc4OD5661KCiQt9Z/+9z2fAJf+w47I0qbmMPev F4xMSZkK8FYh9zzZjEl7plT2fgfbPvwyep1gN9NkjxYYpaSyMzv+T3FT/sHKhB5t1ukO obYtKOe5YlNmcDFKD1hD/D5YN/PpsYf5xC5sFd2sX6l6zVC6WPA4Q/2TvFfWf4Y2Hq/6 TyQY0PuZI4DoYu6y1cEjJjV0+M4bt3pMF0IeENH7heLOJauCYx3aMVzLhxlOUc48EJp4 2PkyMHaB78Uc5msc23XWw4dJG629x8YeJNI0aC975K5CrLVC5+jEjPsPVrWPdJnVhDIB fu7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2rDzUBiAXq8WeOya5qKO0dSqC2zbQBO5oRNMD/vUpdo=; b=hdzIz3yOwhjBqnDrNinRQfURapjCO/feZ7OESk4GZjLeQ2f6wMf/7i/NMIyJIk1AwN TAg7bLqbIqv9+N24q7uY+g3hpiw5J2Jghpq8X5gtiXrvCE7S0xwyIojDLlytNzOz2xM7 ZJTSBZHqHY1SG4TcCGVrOGE76xXII/osH5e5QgfJDx00GuNcS7hDSGh1Tc3r9nEPZ77u VGjF/6VQbiT+Bgm3+MDtg+RU1UFTeCZRLWbsSTrjCTPnV7hk9WLlbC0wn6ht+GR60IFK +P+oWZ28O8Yzq8KZVYSR1nInb5EWw94pHpj7jvKd05a9y0waP9QP0sMXG++z4qDn7acv 9Kqw== X-Gm-Message-State: APzg51CY1Ld2myOfcfHT/JMZgv99eL8u42pnSDd6UvBbfpYpvc+DS5oh jbPrM5Odq2qyReHDHDnC019HVr2j X-Google-Smtp-Source: ANB0VdbG6oW0B3I5bQ0WSxno08UpghSAUi0G9kxrZv7eUeTMDnahrjSmcGpjHb1sdFbN5FaO+T7iyw== X-Received: by 2002:a63:9809:: with SMTP id q9-v6mr2104766pgd.58.1536756589601; Wed, 12 Sep 2018 05:49:49 -0700 (PDT) Received: from cat-arch.lan (li1862-137.members.linode.com. [172.105.208.137]) by smtp.gmail.com with ESMTPSA id w12-v6sm1739393pfd.110.2018.09.12.05.49.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 05:49:48 -0700 (PDT) From: damenly.su@gmail.com X-Google-Original-From: suy.fnst@cn.fujitsu.com To: linux-btrfs@vger.kernel.org Cc: suy.fnst@cn.fujitsu.com Subject: [PATCH v2 2/7] btrfs-progs: make btrfs_unlink() lookup inode_extref Date: Wed, 12 Sep 2018 20:49:19 +0000 Message-Id: <20180912204924.10089-3-suy.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180912204924.10089-1-suy.fnst@cn.fujitsu.com> References: <20180912204924.10089-1-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 From: Su Yue btrfs_unlink() uses btrfs_lookup_inode_ref() to look up inode_ref but forget inode_extref case. Let btrfs_unlink() call btrfs_lookup_inode_extref() if inode_ref is found and EXTENDED_IREF feature is enabled. Fixes: 0cc75eddd093 ("btrfs-progs: Add btrfs_unlink() and btrfs_add_link() functions.") Signed-off-by: Su Yue Reviewed-by: Qu Wenruo --- inode.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/inode.c b/inode.c index 2398bca4a109..598ad0ab6b4c 100644 --- a/inode.c +++ b/inode.c @@ -277,6 +277,7 @@ int btrfs_unlink(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_key key; struct btrfs_inode_item *inode_item; struct btrfs_inode_ref *inode_ref; + struct btrfs_inode_extref *inode_extref = NULL; struct btrfs_dir_item *dir_item; u64 inode_size; u32 nlinks; @@ -296,7 +297,18 @@ int btrfs_unlink(struct btrfs_trans_handle *trans, struct btrfs_root *root, ret = PTR_ERR(inode_ref); goto out; } - if (inode_ref) + + if (!inode_ref && btrfs_fs_incompat(root->fs_info, EXTENDED_IREF)) { + btrfs_release_path(path); + inode_extref = btrfs_lookup_inode_extref(trans, root, path, + name, namelen, ino, parent_ino, 0); + if (IS_ERR(inode_extref)) { + ret = PTR_ERR(inode_extref); + goto out; + } + } + + if (inode_ref || inode_extref) del_inode_ref = 1; btrfs_release_path(path); From patchwork Wed Sep 12 20:49:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Su Yue X-Patchwork-Id: 10597467 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 0F9F813BF for ; Wed, 12 Sep 2018 12:49:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00FE029C69 for ; Wed, 12 Sep 2018 12:49:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E9A0F29EA7; Wed, 12 Sep 2018 12:49:55 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 A0BDB29C69 for ; Wed, 12 Sep 2018 12:49:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726818AbeILRyQ (ORCPT ); Wed, 12 Sep 2018 13:54:16 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:44102 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726491AbeILRyQ (ORCPT ); Wed, 12 Sep 2018 13:54:16 -0400 Received: by mail-pl1-f195.google.com with SMTP id ba4-v6so928511plb.11 for ; Wed, 12 Sep 2018 05:49:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xTTQtBI48mgaANzzKeLeRM6T/v0WiYj9yaH6pULdaLY=; b=d8M+6whCWtUmIxz8mB5YUghWeQsd3oZPGQPaqfIDUIKoj3DISKqSOuoKZ6NnCtRrDA 1t6jjVGuKdq2b9VJbiSmdSZDtSSCUlgQbZNrNs7VW9JrnvbDWIvaQ/+tSUcZlnZjhavH OUrQmep5YL4h4EnFUSAM/FJA2tQ29tUUCxYOHAY7I5Tk/7DFXOlQ6hiVpyvpymuDUXi6 y907+m4Jbj3hVvRoxizHTv5bAxm9VHnGJ9JuG40uqii/B/vcnAbKYib8vx+60T/LFOzN CtrdXDrssaJFzYSoETDh324jIQ6t+/+3Jhecw+w0XMdx4bE4gjdffisZm38jZVmvzim3 EVeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xTTQtBI48mgaANzzKeLeRM6T/v0WiYj9yaH6pULdaLY=; b=CAq0+e9An2jY7VuLvXGQ5PEalUHTBj4DYkVVTh+Bg3iZMYjfmrppSY3H+l0a8OS/ld NJvGJDm91SHIuRjSLWtjKKyXUNxndwJtMo7wAu/luwrMAC1KeNmc7IwSv5hN0OVe1seU E37mwWW5OWIr1jsjIBDGC2aczfUa316XwNJ1Ht164I1xWz/ruShIJQ/sUyVbGLGDufoU yk6aWzfXNfTZZAd9rt60mHpMlUS447IdNyKeDgQNGhwiGUVHBs9fMPKxTOZun3l/HBzR lVSUsT/CktNnkpX/YIYYPs4zyXyTxaM5hHcU1oslaUzIxNysHv7QHdnWPyq95XikCosC L4Bw== X-Gm-Message-State: APzg51CX/PCfUA4Yqqz13oivUTBYyKYVTx3qrtwNW9lBbI4DJekZWZwK BPhSMsGjXUsbzKwP3e7fGz1cLjsY X-Google-Smtp-Source: ANB0VdaNESu/k+7e0uySWc05lnGfXzPBtl2+6PahMAZVv1vABLb7SFShVSNJcQeJyyYKUYB94fFOKQ== X-Received: by 2002:a17:902:7e09:: with SMTP id b9-v6mr2065170plm.221.1536756593777; Wed, 12 Sep 2018 05:49:53 -0700 (PDT) Received: from cat-arch.lan (li1862-137.members.linode.com. [172.105.208.137]) by smtp.gmail.com with ESMTPSA id w12-v6sm1739393pfd.110.2018.09.12.05.49.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 05:49:52 -0700 (PDT) From: damenly.su@gmail.com X-Google-Original-From: suy.fnst@cn.fujitsu.com To: linux-btrfs@vger.kernel.org Cc: suy.fnst@cn.fujitsu.com Subject: [PATCH v2 3/7] btrfs-progs: lowmem check: find dir_item by di_key in check_dir_item() Date: Wed, 12 Sep 2018 20:49:20 +0000 Message-Id: <20180912204924.10089-4-suy.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180912204924.10089-1-suy.fnst@cn.fujitsu.com> References: <20180912204924.10089-1-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 From: Su Yue In check_dir_item, we are going to search corresponding dir_item/index. Commit 564901eac7a4 ("btrfs-progs: check: introduce print_dir_item_err()") Changed argument name from key to di_key but forgot to change the key name for dir_item search. So @key shouldn't be used here. It should be @di_key. Fixes: 564901eac7a4 ("btrfs-progs: check: introduce print_dir_item_err()") Signed-off-by: Su Yue --- check/mode-lowmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c index 1bce44f5658a..89a304bbdd69 100644 --- a/check/mode-lowmem.c +++ b/check/mode-lowmem.c @@ -1658,7 +1658,7 @@ begin: /* check relative INDEX/ITEM */ key.objectid = di_key->objectid; - if (key.type == BTRFS_DIR_ITEM_KEY) { + if (di_key->type == BTRFS_DIR_ITEM_KEY) { key.type = BTRFS_DIR_INDEX_KEY; key.offset = index; } else { From patchwork Wed Sep 12 20:49:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Su Yue X-Patchwork-Id: 10597469 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 C3D60920 for ; Wed, 12 Sep 2018 12:50:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4B2D29EB2 for ; Wed, 12 Sep 2018 12:50:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A861129EBD; Wed, 12 Sep 2018 12:50:01 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 4C77229EB7 for ; Wed, 12 Sep 2018 12:50:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726854AbeILRyW (ORCPT ); Wed, 12 Sep 2018 13:54:22 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:38623 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726491AbeILRyW (ORCPT ); Wed, 12 Sep 2018 13:54:22 -0400 Received: by mail-pg1-f195.google.com with SMTP id t84-v6so1022754pgb.5 for ; Wed, 12 Sep 2018 05:49:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2lgbWTPOvhCAsaKaygFcTZYRMWFYqV5/XIukbiosfa0=; b=H+KkkM3QToOWMM/dnxUsZy9H24gObHjzkvxsKtpzF1AlwyQj9wQZnbQKYBSpCXGbUM 1IvjcIUdA+Mx0qKzVQ5FHpEDotqwwe0iQkXhNqgGdtCFiB/5uhUp0HYtC2x1djHDu2I0 3zHZAKcjp4Jbj+YiE8PBEcMOhVDGia/ukKFm/i1fBw9Men6Gd/OxcgjF7istO6Z82ujI RDQ0ZChFP/qPQmfzm7WPzpbqN4ZXngJwQfLznK81ec6bwBKUJtyrXMAl9EsnT0rJfLOb vA++Hc7eGpm2XUnotJIWAZSPfdBQPKYco+vTdApHwp7ZOC1k5FfSdFbV2YCJD5bz16/d chQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2lgbWTPOvhCAsaKaygFcTZYRMWFYqV5/XIukbiosfa0=; b=mJmuvK53rwkWSVpOg9pmaALbN0dYZga8/1UxXePR0ybLhHSqjbloR/ck5j54RAv+Yv OKDzs/zNwooIY/9kz8zXsP3VTt7kiTXOFqolNt1coX2hsOQREDzeoxCmXyfq+J8qsX8/ 1l8L48F5/41g9bwytoxdPuzCFe0UaYj+YJvT1CtvMqY0UnzCAeGmNJwuA4GFl/2vS9Me 2dVmczbmmQ1sYvj3uYTpHdnMr1zLcsf/j7ZX9yhuLUvvh2FQekvRRznSFU1j5p5eNvGw BSl5Q8M+mB14frBMPazL4C8AVHBRNARl9XXHXj+YS3bcR8Om49XuN6MYiEyUYkVMTzQf /qpg== X-Gm-Message-State: APzg51BFcdXyNbx+QZ2fFA4O9qI6KkYq9wBj5EjrqVJTA8aCEnCEaoFW m2H+Xcqgp5tPqM4QXwggmpboVQ4K X-Google-Smtp-Source: ANB0Vdb3Zr1xdTefRiUYSjWLXFELoudkziqKW2h3ujO619BxVRFNGd2UdxV6MkI81kP6o8LPlsH4kA== X-Received: by 2002:a65:5581:: with SMTP id j1-v6mr2073004pgs.203.1536756598973; Wed, 12 Sep 2018 05:49:58 -0700 (PDT) Received: from cat-arch.lan (li1862-137.members.linode.com. [172.105.208.137]) by smtp.gmail.com with ESMTPSA id w12-v6sm1739393pfd.110.2018.09.12.05.49.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 05:49:57 -0700 (PDT) From: damenly.su@gmail.com X-Google-Original-From: suy.fnst@cn.fujitsu.com To: linux-btrfs@vger.kernel.org Cc: suy.fnst@cn.fujitsu.com Subject: [PATCH v2 4/7] btrfs-progs: lowmem: search key of root again after check_fs_root() under repair Date: Wed, 12 Sep 2018 20:49:21 +0000 Message-Id: <20180912204924.10089-5-suy.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180912204924.10089-1-suy.fnst@cn.fujitsu.com> References: <20180912204924.10089-1-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 From: Su Yue In check_fs_roots_lowmem(), we do search and follow the resulted path to call check_fs_root(), then call btrfs_next_item() to check next root. However, if repair is enabled, the root tree can be cowed, the existed path can cause strange errors. Solution: If repair, save the key before calling check_fs_root, search the saved key again before checking next root. Signed-off-by: Su Yue --- check/mode-lowmem.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c index 89a304bbdd69..8fc9edab1d66 100644 --- a/check/mode-lowmem.c +++ b/check/mode-lowmem.c @@ -4967,9 +4967,13 @@ int check_fs_roots_lowmem(struct btrfs_fs_info *fs_info) } while (1) { + struct btrfs_key saved_key; + node = path.nodes[0]; slot = path.slots[0]; btrfs_item_key_to_cpu(node, &key, slot); + if (repair) + saved_key = key; if (key.objectid > BTRFS_LAST_FREE_OBJECTID) goto out; if (key.type == BTRFS_ROOT_ITEM_KEY && @@ -5000,6 +5004,17 @@ int check_fs_roots_lowmem(struct btrfs_fs_info *fs_info) err |= ret; } next: + /* + * Since root tree can be cowed during repair, + * here search the saved key again. + */ + if (repair) { + btrfs_release_path(&path); + ret = btrfs_search_slot(NULL, fs_info->tree_root, + &saved_key, &path, 0, 0); + /* Repair never deletes trees, search must succeed. */ + BUG_ON(ret); + } ret = btrfs_next_item(tree_root, &path); if (ret > 0) goto out; From patchwork Wed Sep 12 20:49:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Su Yue X-Patchwork-Id: 10597471 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 149FB920 for ; Wed, 12 Sep 2018 12:50:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06B2A29EE0 for ; Wed, 12 Sep 2018 12:50:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0511C29EE5; Wed, 12 Sep 2018 12:50:06 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 A945229EE0 for ; Wed, 12 Sep 2018 12:50:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726885AbeILRy0 (ORCPT ); Wed, 12 Sep 2018 13:54:26 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:41140 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726491AbeILRy0 (ORCPT ); Wed, 12 Sep 2018 13:54:26 -0400 Received: by mail-pf1-f195.google.com with SMTP id h79-v6so967189pfk.8 for ; Wed, 12 Sep 2018 05:50:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ob6HC2Qr+/xkJ3W9+DCgrFS7bnUvOSciHzabJpvL+xQ=; b=uaGidyHUCyhZcRCc8+diV2AhCDQ2WQx9kVV9PZn8ht5vOLRcaQ63ng9+Xxg3knGjmZ v4nNndAlP3+CHdjNKOm7S5ZYp02SKVNbrzYGXQRz3H2iJJLGm/eN6eH13kReHu9hq2eB nE/EwhoWRs2ekSsEFqn+T/7ih0LCn65NJc0HSaOlRBHzZjEUliym4h1wdGMD+Ld4uJW6 OYmweitPV2tj5mXuyl4Jp5KVhmdJWFOfU7zju3/Zoqu8ZKqxg4xFYQOTlsR0Tot4S417 FKEzbEXh8IursTUn5of4aH1XwxtEUnPQCJXwzPn/ZLNEKTloEFIPuNke8ld0SmNgNFYI XvDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ob6HC2Qr+/xkJ3W9+DCgrFS7bnUvOSciHzabJpvL+xQ=; b=eiOw1BAXz3Xzut90yrsc6rKiIlCEat6WilSIU9hY3+oMgJRRJoPfFnbT+3cA6RMDWg UXZYg3B7GxnoqQPGqxuqTlWAalv9cl/Xd0PFFd+8Hl5Bbob3y+uAdWVhVMqs4/JKiyAA eOUa3NwICnLc49cDzPTDQ+z/h7+eFYiI++BPypn4J/kTa9ETmwmrNwhj/hXh1gzbJTd8 9rFznB0XFhr2xFBBhl1+vHWJQSZv3o1K3pGZfjhRCIwiDJReBqaW0gUWS4+CMm/SxuGU 4IxRXCGjRVExn9YfH18XW3eTahxmuVI7/EjCBPCcuVHpV7p6yYx5b65/MnqNW6Z8Wpad J6kg== X-Gm-Message-State: APzg51AK8i0SbjfkEBeRDkzbmmTMw2wtC1ZfSd+i48gpUcYGyaPuIs+A PJuULNmt3YLrg5iL4FILxNmVDGFc X-Google-Smtp-Source: ANB0VdbwXL1D04IaZtzbHAPfaO/+I3IHrbclEVTWaVI325uQJAMyPLGKomuYlbEhWDykP2DW2AFP4g== X-Received: by 2002:a63:fb57:: with SMTP id w23-v6mr2089998pgj.441.1536756603476; Wed, 12 Sep 2018 05:50:03 -0700 (PDT) Received: from cat-arch.lan (li1862-137.members.linode.com. [172.105.208.137]) by smtp.gmail.com with ESMTPSA id w12-v6sm1739393pfd.110.2018.09.12.05.49.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 05:50:02 -0700 (PDT) From: damenly.su@gmail.com X-Google-Original-From: suy.fnst@cn.fujitsu.com To: linux-btrfs@vger.kernel.org Cc: suy.fnst@cn.fujitsu.com Subject: [PATCH v2 5/7] btrfs-progs: lowmem: continue to check item in last slot while checking inodes Date: Wed, 12 Sep 2018 20:49:22 +0000 Message-Id: <20180912204924.10089-6-suy.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180912204924.10089-1-suy.fnst@cn.fujitsu.com> References: <20180912204924.10089-1-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 From: Su Yue After call of check_inode_item(), path may point to the last unchecked slot of the leaf. The outer walk_up_tree() always treats the position as checked item then skips to next item. If the last item was an inode item, yes, it was unchecked. Then walk_up_tree() will think the leaf is checked and walk up to upper node, process_one_leaf() in walk_down_tree() would skip to check next inode item. Which means, the inode item won't be checked. Solution: After check_inode_item returns, if found path point to the last item of a leaf, decrease path slot manually, so walk_up_tree() will stay on the leaf. Fixes: 5e2dc770471b ("btrfs-progs: check: skip shared node or leaf check for low_memory mode") Signed-off-by: Su Yue --- check/mode-lowmem.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c index 8fc9edab1d66..b6b33786d02b 100644 --- a/check/mode-lowmem.c +++ b/check/mode-lowmem.c @@ -2612,6 +2612,18 @@ again: if (cur->start == cur_bytenr) goto again; + /* + * path may point at the last item(a inode item maybe) in a leaf. + * Without below lines, walk_up_tree() will skip the item which + * means all items related to the inode will never be checked. + * Decrease the slot manually, walk_up_tree won't skip to next node + * if it occurs. + */ + if (path->slots[0] + 1 >= btrfs_header_nritems(path->nodes[0])) { + if (path->slots[0]) + path->slots[0]--; + } + /* * we have switched to another leaf, above nodes may * have changed, here walk down the path, if a node From patchwork Wed Sep 12 20:49:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Su Yue X-Patchwork-Id: 10597473 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 029AD920 for ; Wed, 12 Sep 2018 12:50:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E8C6129EB7 for ; Wed, 12 Sep 2018 12:50:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD1C729EE2; Wed, 12 Sep 2018 12:50:10 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 40F7129ED4 for ; Wed, 12 Sep 2018 12:50:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726970AbeILRyb (ORCPT ); Wed, 12 Sep 2018 13:54:31 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:33934 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726491AbeILRyb (ORCPT ); Wed, 12 Sep 2018 13:54:31 -0400 Received: by mail-pl1-f195.google.com with SMTP id f6-v6so949303plo.1 for ; Wed, 12 Sep 2018 05:50:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SgFZbqFuo8IayjETyOxV+cFtZfIL4o1etpUJKGpLWXo=; b=sUba2uoD3XsVs07AqZl9YDxhgLyQORLtuBdkxLmy+N7Y9A2Uz6U7UpETrqEDIChNjy icfaJQMC5Ze6Y5BGMCt+IPp0cTS4id/IqhmK5Vj22FUbmzM7ZL4zxRcCo1oBzHG2WKw/ BfjfKIVGmoyoYaGXna3SLm0GVgDmKeIO0k495W7EROO7clFBINdJjhj74kAjRFNBnxAW dZk9daz9g5uryd0GyCW0cEMbCrELYedzn3xBWS4yFBjJ4kFYvZE8twa05n10sRJf/NMz +9THo1DcS51Mrwm2srmhj0FImEAxlF+GPLQ+qnxiE3GWEdsJj0ZPpP3ZDH5IrJPPDWZp o9OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=SgFZbqFuo8IayjETyOxV+cFtZfIL4o1etpUJKGpLWXo=; b=U64t4zTNDu14v0Zrs52dnzQ5w5B5Z0gXhc0mEBhdhxjZTwm0GZ9N0WAhflKfiDvJYU WoFa77MaB3p7SJaB37TrjGm4GbJwcxMuVzhVhMtCDzwXWsIr1YV6ySl4vPOdSuI7uxaX P81ORisscpCcB/Uhzk4oar5xHx+Swx7KnSlOKNdhJkQ1PDv384YuR6Am1ZjEtdJkr8jf K/WumNRNyVJhE9Buh67lRQV9BLPqMEIJTlqG4L5VBpT5E8UEE8Phbz62O7MR7w1DYiEG klHq1ujwFHlHvV7IhT/pP2pliDrMA8V9S5rQ0b8Gk+o2UppKmS+fj4b/evymSsKB8wl1 0l5A== X-Gm-Message-State: APzg51CEm1Q83ups21oIgyyYzpq3YU0emZroI2LTT21GWd5jgvXTRjsG fBWeqVzvHRj+2dCHDbeX25lP89i9 X-Google-Smtp-Source: ANB0VdZrVvnQrDVZV4OdAxOdUXInlzX1wB42Abc+sgrwjtMlAAiVnSSCc0bJo5GzK09TkAsgNQZ6wA== X-Received: by 2002:a17:902:6115:: with SMTP id t21-v6mr2118143plj.92.1536756607888; Wed, 12 Sep 2018 05:50:07 -0700 (PDT) Received: from cat-arch.lan (li1862-137.members.linode.com. [172.105.208.137]) by smtp.gmail.com with ESMTPSA id w12-v6sm1739393pfd.110.2018.09.12.05.50.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 05:50:06 -0700 (PDT) From: damenly.su@gmail.com X-Google-Original-From: suy.fnst@cn.fujitsu.com To: linux-btrfs@vger.kernel.org Cc: suy.fnst@cn.fujitsu.com Subject: [PATCH v2 6/7] btrfs-progs: lowmem: improve check_inode_extref() Date: Wed, 12 Sep 2018 20:49:23 +0000 Message-Id: <20180912204924.10089-7-suy.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180912204924.10089-1-suy.fnst@cn.fujitsu.com> References: <20180912204924.10089-1-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 From: Su Yue inode_extref is much similar with inode_ref, most codes are reused in check_inode_extref(). Exception: There is no need to check root directory, so remove it. Make check_inode_extref() verify hash value with key offset now. And lowmem check can detect errors about inode_extref and try to repair errors. Signed-off-by: Su Yue --- check/mode-lowmem.c | 119 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 92 insertions(+), 27 deletions(-) diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c index b6b33786d02b..bec2ee185cc8 100644 --- a/check/mode-lowmem.c +++ b/check/mode-lowmem.c @@ -1182,37 +1182,79 @@ out: * * Return 0 if no error occurred. */ -static int check_inode_extref(struct btrfs_root *root, - struct btrfs_key *ref_key, - struct extent_buffer *node, int slot, u64 *refs, - int mode) +static int check_inode_extref(struct btrfs_root *root, struct btrfs_key *ref_key, + struct btrfs_path *path, char *name_ret, + u32 *namelen_ret, u64 *refs_ret, int mode) { struct btrfs_key key; struct btrfs_key location; struct btrfs_inode_extref *extref; + struct extent_buffer *node; char namebuf[BTRFS_NAME_LEN] = {0}; u32 total; - u32 cur = 0; + u32 cur; u32 len; u32 name_len; u64 index; u64 parent; + int err; + int tmp_err; int ret; - int err = 0; + int slot; + u64 refs; + bool search_again = false; location.objectid = ref_key->objectid; location.type = BTRFS_INODE_ITEM_KEY; location.offset = 0; +begin: + cur = 0; + err = 0; + refs = *refs_ret; + *namelen_ret = 0; + + /* since after repair, path and the dir item may be changed */ + if (search_again) { + search_again = false; + btrfs_release_path(path); + ret = btrfs_search_slot(NULL, root, ref_key, path, 0, 0); + /* + * The item was deleted, let the path point to the last checked + * item. + */ + if (ret > 0) { + if (path->slots[0] == 0) { + ret = btrfs_prev_leaf(root, path); + /* + * we are checking the inode item, there must + * be some items before, the case shall never + * happen. + */ + BUG_ON(ret); + } else { + path->slots[0]--; + } + goto out; + } else if (ret < 0) { + err |= ret; + goto out; + } + } + + node = path->nodes[0]; + slot = path->slots[0]; extref = btrfs_item_ptr(node, slot, struct btrfs_inode_extref); total = btrfs_item_size_nr(node, slot); -next: - /* update inode ref count */ - (*refs)++; - name_len = btrfs_inode_extref_name_len(node, extref); - index = btrfs_inode_extref_index(node, extref); +loop: + /* Update inode ref count */ + refs++; + tmp_err = 0; parent = btrfs_inode_extref_parent(node, extref); + index = btrfs_inode_extref_index(node, extref); + name_len = btrfs_inode_extref_name_len(node, extref); + if (name_len <= BTRFS_NAME_LEN) { len = name_len; } else { @@ -1220,37 +1262,60 @@ next: warning("root %llu INODE_EXTREF[%llu %llu] name too long", root->objectid, ref_key->objectid, ref_key->offset); } + read_extent_buffer(node, namebuf, (unsigned long)(extref + 1), len); - /* Check root dir ref name */ - if (index == 0 && strncmp(namebuf, "..", name_len)) { - error("root %llu INODE_EXTREF[%llu %llu] ROOT_DIR name shouldn't be %s", + /* verify hash value */ + if (ref_key->offset != btrfs_extref_hash(parent, namebuf, len)) { + err |= -EIO; + error("root %llu INODE_EXTREF[%llu %llu] name %s namelen %u mode %d mismatch with its hash, wanted %llu have %llu", root->objectid, ref_key->objectid, ref_key->offset, - namebuf); - err |= ROOT_DIR_ERROR; + namebuf, len, mode, ref_key->offset, + btrfs_extref_hash(parent, namebuf, len)); + goto out; } - /* find related dir_index */ + /* copy the first name found to name_ret */ + if (refs == 1 && name_ret) { + memcpy(name_ret, namebuf, len); + *namelen_ret = len; + } + + /* Find related DIR_INDEX */ key.objectid = parent; key.type = BTRFS_DIR_INDEX_KEY; key.offset = index; - ret = find_dir_item(root, &key, &location, namebuf, len, mode); - err |= ret; + tmp_err |= find_dir_item(root, &key, &location, namebuf, len, + imode_to_type(mode)); - /* find related dir_item */ + /* Find related dir_item */ key.objectid = parent; key.type = BTRFS_DIR_ITEM_KEY; key.offset = btrfs_name_hash(namebuf, len); - ret = find_dir_item(root, &key, &location, namebuf, len, mode); - err |= ret; + tmp_err |= find_dir_item(root, &key, &location, namebuf, len, + imode_to_type(mode)); + + if (tmp_err && repair) { + ret = repair_ternary_lowmem(root, parent, ref_key->objectid, + index, namebuf, name_len, imode_to_type(mode), + tmp_err); + if (!ret) { + search_again = true; + goto begin; + } + } + print_inode_ref_err(root, ref_key, index, namebuf, name_len, + imode_to_type(mode), tmp_err); + + err |= tmp_err; len = sizeof(*extref) + name_len; extref = (struct btrfs_inode_extref *)((char *)extref + len); cur += len; - if (cur < total) - goto next; - + goto loop; +out: + *refs_ret = refs; return err; } @@ -2426,8 +2491,8 @@ static int check_inode_item(struct btrfs_root *root, struct btrfs_path *path) warning("root %llu EXTREF[%llu %llu] isn't supported", root->objectid, key.objectid, key.offset); - ret = check_inode_extref(root, &key, node, slot, &refs, - mode); + ret = check_inode_extref(root, &key, path, namebuf, + &name_len, &refs, mode); err |= ret; break; } From patchwork Wed Sep 12 20:49:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Su Yue X-Patchwork-Id: 10597475 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 2581F15E2 for ; Wed, 12 Sep 2018 12:50:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1727129EE8 for ; Wed, 12 Sep 2018 12:50:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 155D329E96; Wed, 12 Sep 2018 12:50:17 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 9FD6529EB6 for ; Wed, 12 Sep 2018 12:50:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726992AbeILRyg (ORCPT ); Wed, 12 Sep 2018 13:54:36 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:46956 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726491AbeILRyg (ORCPT ); Wed, 12 Sep 2018 13:54:36 -0400 Received: by mail-pg1-f195.google.com with SMTP id b129-v6so1003439pga.13 for ; Wed, 12 Sep 2018 05:50:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WH9R74tAHEiQvmoI8Is8Q2vzIXkZSAxkIRJmdKx7KVE=; b=fJLNLgdy5xaZVdoFYLDI52fbBxiXVP5YgG0kvajDN5IcJRdQENUODUcYPU++UJYlg+ j79J7V5PpuyeM5lOn3wc9Y6/qbptgbqr2Hhen0FMVzhokDttNzEKHPD7EAi3FkJ0ez30 pho8nT1QBJ/o1mxt2F7BIMnCUtEZuG7U8UjDzay8GMleqCWLi3FnzJ8v05QzF0zZYIw8 g6BuOa4teWXiFmKWF76fJAPo2nDyYPuk9JqFIG/ABZe59iBnhPQevRyButDQ0Lek5epd Cu6LGyQZ1364Qbe4uEJEwQbPWIcm7tdjY8xNA1MFN3Iz8BNXseCcciBzu+YI4rEZ3kS6 3YVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WH9R74tAHEiQvmoI8Is8Q2vzIXkZSAxkIRJmdKx7KVE=; b=AUHgnYjNn9z/PHpL5ETikkxjtz0LIxk6bfy9dSRuhiCIPsLCQSFehJqOz+OWh2ksD3 K19DWA7Pgo8dFbPQcZ2l1Wci6U0ST7phW2X8FvLmZIjr1jqJok58jxVTOJCLJ5WB/BrQ QEI6B7TF5CtUBpYctTCvCVXeKwmmHSh8C08dGodGwcUr/zEId58x8dqgknO3O32BOui9 +Wv9iKfQy9hc4pCU9UcT2TvIAbxmoXt9TXvVawvZtdkCKyRB/ygid7kXG3Te2aotYIG8 m4xVGXUaQDW0lAYX8A2/ty+WzJdf/FPvbhhr7yk5mS/aYo5xZ4goDleB6sa88/bR6D3s l2kw== X-Gm-Message-State: APzg51DpDeAzE2r0YceoZi/np1WjiO893CEfOaOG1803aoj+SnkDvEiq NzhU821CCBxcJqYjf0P8NB9BAAFe X-Google-Smtp-Source: ANB0Vdb+N9wxmYuN6It1JCHgbUM9fqpcbhzpFNEfMvU/+JzNqQnKtmwcQrfPCBELyPIfcM0dxu0rCw== X-Received: by 2002:a62:6781:: with SMTP id t1-v6mr2177031pfj.200.1536756612277; Wed, 12 Sep 2018 05:50:12 -0700 (PDT) Received: from cat-arch.lan (li1862-137.members.linode.com. [172.105.208.137]) by smtp.gmail.com with ESMTPSA id w12-v6sm1739393pfd.110.2018.09.12.05.50.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 05:50:11 -0700 (PDT) From: damenly.su@gmail.com X-Google-Original-From: suy.fnst@cn.fujitsu.com To: linux-btrfs@vger.kernel.org Cc: suy.fnst@cn.fujitsu.com Subject: [PATCH v2 7/7] btrfs-progs: fsck-tests: add test case inode_extref without dir_item and dir_index Date: Wed, 12 Sep 2018 20:49:24 +0000 Message-Id: <20180912204924.10089-8-suy.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180912204924.10089-1-suy.fnst@cn.fujitsu.com> References: <20180912204924.10089-1-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 From: Su Yue 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: improve check_inode_extref()'. And rename default_case.img to inode_ref_without_dir_item_index.img. Signed-off-by: Su Yue --- .../inode_extref_without_dir_item_index.img | Bin 0 -> 10240 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_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_index.img b/tests/fsck-tests/009-no-dir-item-or-index/inode_extref_without_dir_item_index.img new file mode 100644 index 0000000000000000000000000000000000000000..85f7a8211fe66dfa9b2b1f3a98e72f54cd402616 GIT binary patch literal 10240 zcmeHscQo8j8?UlhEOymZqDGCfdWp7rf~Y~1#Of{4q9>NMSe=L(Wkn}~5JZVy61@b` zOY|NsBwmBv=mszSgNy&l!H|F1 z$NlwH{s)Ks?ejn7KN0v(1pZ$}z<*}eU&ND$kky0Zga5{R>1!Q|jBj!Kk_IdwP^`75 zM#+ojWKDf@k7f}D9aT8qYmSi4F2VupuXr{D%*M11tY*yA57Z39C|MYjWMVhzVK5j1 zieWerkiPZjcdzsBS22#CPt1DVI!`Y9h*_LYFoYww&j3lOEQw=`DnvA?wF8(}YD85$ zG7$zaGL3dVC{eyOEl3W_-qsf~#zJSUyqf<-HM2v|!&%~jSR%lz|08~jx;7^e3~;sY zT^phzaQf-A9pzJu&sDmw_AnE#I*l;xF8RnBNniHgj!g0JPRgY|`OkhQSmPV3fQT{G?g$ZX6e{@Ov^aKMAG zr|O5JwU)}O00QwdZZ<+yyfQ#~Ka9r6hA@3Oik}0|;rd7T)~&xIk460t)3|9Uli=;g zh~{}Qn(6qP?bLNIenC5 zLO3=6UuM9&&4o2fB&4lmozz;AiUWx^ndhJ)O`@bM4QWxL!mC>|7xSNK`Sw)H$N)-m zSXz2)pA0>PYZPT59_=l(%tNBo?D|v)$%|6$`GKhK<>+y93Fiy zTiWZzmC*aeUfXv1K)7a?^YiuO;WXH%#MegmjkD8b)YP2MzV{*|{#*5|R9Ov&-Q^d% z_IMBdg|z+-kf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LKS6vBSalAM0$E@Znj$SeTm9Za=D;e^jkae#TL7u zop{9Q*i=kkmFf(1#nC>BUR#aP*L>lAHec!>dMy@#iBr}q>C~VS?F?Mr8h6h3(1c8;nAltM4PK(Hw8o8Nj2PVLWOH2NyUJs=e(u@092# kuJE&u`WfiUR27hTDGCa0|Gszr5C2aD{u6=!zasEo0Lh(cb^rhX 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