From patchwork Mon Jan 28 15:20:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Foster X-Patchwork-Id: 10783883 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 4221A13BF for ; Mon, 28 Jan 2019 15:20:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3276A2B0A3 for ; Mon, 28 Jan 2019 15:20:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 30D292B15C; Mon, 28 Jan 2019 15:20:38 +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 BA9242B0A3 for ; Mon, 28 Jan 2019 15:20:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726647AbfA1PUg (ORCPT ); Mon, 28 Jan 2019 10:20:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40616 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726266AbfA1PUg (ORCPT ); Mon, 28 Jan 2019 10:20:36 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2042980F7C for ; Mon, 28 Jan 2019 15:20:36 +0000 (UTC) Received: from bfoster.bos.redhat.com (dhcp-41-66.bos.redhat.com [10.18.41.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id C8CBB19E34 for ; Mon, 28 Jan 2019 15:20:35 +0000 (UTC) From: Brian Foster To: linux-xfs@vger.kernel.org Subject: [PATCH RFC v2 1/3] xfs: create a separate finobt verifier Date: Mon, 28 Jan 2019 10:20:32 -0500 Message-Id: <20190128152034.21080-2-bfoster@redhat.com> In-Reply-To: <20190128152034.21080-1-bfoster@redhat.com> References: <20190128152034.21080-1-bfoster@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 28 Jan 2019 15:20:36 +0000 (UTC) Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The inobt verifier is reused for the inobt and finobt, which prevents the ability to distinguish between magic values on a per-tree basis. Create a separate finobt structure in preparation for changes to enforce the appropriate magic value for the associated tree. This patch has no functional change. Signed-off-by: Brian Foster --- fs/xfs/libxfs/xfs_ag.c | 2 +- fs/xfs/libxfs/xfs_ialloc_btree.c | 9 ++++++++- fs/xfs/libxfs/xfs_shared.h | 1 + fs/xfs/scrub/agheader_repair.c | 2 +- fs/xfs/xfs_log_recover.c | 6 ++++-- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/fs/xfs/libxfs/xfs_ag.c b/fs/xfs/libxfs/xfs_ag.c index 999ad8d00d43..bde67ef3ff43 100644 --- a/fs/xfs/libxfs/xfs_ag.c +++ b/fs/xfs/libxfs/xfs_ag.c @@ -361,7 +361,7 @@ xfs_ag_init_headers( { /* FINO root block */ .daddr = XFS_AGB_TO_DADDR(mp, id->agno, XFS_FIBT_BLOCK(mp)), .numblks = BTOBB(mp->m_sb.sb_blocksize), - .ops = &xfs_inobt_buf_ops, + .ops = &xfs_finobt_buf_ops, .work = &xfs_btroot_init, .type = XFS_BTNUM_FINO, .need_init = xfs_sb_version_hasfinobt(&mp->m_sb) diff --git a/fs/xfs/libxfs/xfs_ialloc_btree.c b/fs/xfs/libxfs/xfs_ialloc_btree.c index 9b25e7a0df47..798269eb4767 100644 --- a/fs/xfs/libxfs/xfs_ialloc_btree.c +++ b/fs/xfs/libxfs/xfs_ialloc_btree.c @@ -333,6 +333,13 @@ const struct xfs_buf_ops xfs_inobt_buf_ops = { .verify_struct = xfs_inobt_verify, }; +const struct xfs_buf_ops xfs_finobt_buf_ops = { + .name = "xfs_finobt", + .verify_read = xfs_inobt_read_verify, + .verify_write = xfs_inobt_write_verify, + .verify_struct = xfs_inobt_verify, +}; + STATIC int xfs_inobt_keys_inorder( struct xfs_btree_cur *cur, @@ -389,7 +396,7 @@ static const struct xfs_btree_ops xfs_finobt_ops = { .init_rec_from_cur = xfs_inobt_init_rec_from_cur, .init_ptr_from_cur = xfs_finobt_init_ptr_from_cur, .key_diff = xfs_inobt_key_diff, - .buf_ops = &xfs_inobt_buf_ops, + .buf_ops = &xfs_finobt_buf_ops, .diff_two_keys = xfs_inobt_diff_two_keys, .keys_inorder = xfs_inobt_keys_inorder, .recs_inorder = xfs_inobt_recs_inorder, diff --git a/fs/xfs/libxfs/xfs_shared.h b/fs/xfs/libxfs/xfs_shared.h index 1c5debe748f0..9855f4d2f98f 100644 --- a/fs/xfs/libxfs/xfs_shared.h +++ b/fs/xfs/libxfs/xfs_shared.h @@ -36,6 +36,7 @@ extern const struct xfs_buf_ops xfs_dquot_buf_ops; extern const struct xfs_buf_ops xfs_symlink_buf_ops; extern const struct xfs_buf_ops xfs_agi_buf_ops; extern const struct xfs_buf_ops xfs_inobt_buf_ops; +extern const struct xfs_buf_ops xfs_finobt_buf_ops; extern const struct xfs_buf_ops xfs_inode_buf_ops; extern const struct xfs_buf_ops xfs_inode_buf_ra_ops; extern const struct xfs_buf_ops xfs_dquot_buf_ops; diff --git a/fs/xfs/scrub/agheader_repair.c b/fs/xfs/scrub/agheader_repair.c index 03d1e15cceba..673be3cf7b8d 100644 --- a/fs/xfs/scrub/agheader_repair.c +++ b/fs/xfs/scrub/agheader_repair.c @@ -879,7 +879,7 @@ xrep_agi( }, [XREP_AGI_FINOBT] = { .rmap_owner = XFS_RMAP_OWN_INOBT, - .buf_ops = &xfs_inobt_buf_ops, + .buf_ops = &xfs_finobt_buf_ops, .magic = XFS_FIBT_CRC_MAGIC, }, [XREP_AGI_END] = { diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 9fe88d125f0a..228c754bb137 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -2445,11 +2445,13 @@ xlog_recover_validate_buf_type( bp->b_ops = &xfs_allocbt_buf_ops; break; case XFS_IBT_CRC_MAGIC: - case XFS_FIBT_CRC_MAGIC: case XFS_IBT_MAGIC: - case XFS_FIBT_MAGIC: bp->b_ops = &xfs_inobt_buf_ops; break; + case XFS_FIBT_CRC_MAGIC: + case XFS_FIBT_MAGIC: + bp->b_ops = &xfs_finobt_buf_ops; + break; case XFS_BMAP_CRC_MAGIC: case XFS_BMAP_MAGIC: bp->b_ops = &xfs_bmbt_buf_ops; From patchwork Mon Jan 28 15:20:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Foster X-Patchwork-Id: 10783887 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 51D3913BF for ; Mon, 28 Jan 2019 15:20:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4299D2B071 for ; Mon, 28 Jan 2019 15:20:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4109F2B0D4; Mon, 28 Jan 2019 15:20:40 +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 BB9062B071 for ; Mon, 28 Jan 2019 15:20:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726818AbfA1PUi (ORCPT ); Mon, 28 Jan 2019 10:20:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39758 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726266AbfA1PUh (ORCPT ); Mon, 28 Jan 2019 10:20:37 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8D0B287620 for ; Mon, 28 Jan 2019 15:20:36 +0000 (UTC) Received: from bfoster.bos.redhat.com (dhcp-41-66.bos.redhat.com [10.18.41.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3E5EC60462 for ; Mon, 28 Jan 2019 15:20:36 +0000 (UTC) From: Brian Foster To: linux-xfs@vger.kernel.org Subject: [PATCH RFC v2 2/3] xfs: distinguish between inobt and finobt magic values Date: Mon, 28 Jan 2019 10:20:33 -0500 Message-Id: <20190128152034.21080-3-bfoster@redhat.com> In-Reply-To: <20190128152034.21080-1-bfoster@redhat.com> References: <20190128152034.21080-1-bfoster@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 28 Jan 2019 15:20:36 +0000 (UTC) Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The inode btree verifier code is shared between the inode btree and free inode btree because the underlying metadata formats are essentially equivalent. A side effect of this is that the verifier cannot determine whether a particular btree block should have an inobt or finobt magic value. This logic allows an unfortunate xfs_repair bug to escape detection where certain level > 0 nodes of the finobt are stamped with inobt magic by xfs_repair finobt reconstruction. This is fortunately not a severe problem since the inode btree magic values do not contribute to any changes in kernel behavior, but we do need a means to detect and prevent this problem in the future. Add a field to xfs_buf_ops to store the v4 and v5 superblock magic values expected by a particular verifier. Add a helper to check an on-disk magic value against the value expected by the verifier. Call the helper from the shared [f]inobt verifier code for magic value verification. This ensures that the inode btree blocks each have the appropriate magic value based on specific tree type and superblock version. Signed-off-by: Brian Foster --- fs/xfs/libxfs/xfs_ialloc_btree.c | 15 ++++++--------- fs/xfs/xfs_buf.h | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/fs/xfs/libxfs/xfs_ialloc_btree.c b/fs/xfs/libxfs/xfs_ialloc_btree.c index 798269eb4767..c57ecb6b1255 100644 --- a/fs/xfs/libxfs/xfs_ialloc_btree.c +++ b/fs/xfs/libxfs/xfs_ialloc_btree.c @@ -260,6 +260,9 @@ xfs_inobt_verify( xfs_failaddr_t fa; unsigned int level; + if (!xfs_verify_magic(bp, block->bb_magic)) + return __this_address; + /* * During growfs operations, we can't verify the exact owner as the * perag is not fully initialised and hence not attached to the buffer. @@ -270,18 +273,10 @@ xfs_inobt_verify( * but beware of the landmine (i.e. need to check pag->pagi_init) if we * ever do. */ - switch (block->bb_magic) { - case cpu_to_be32(XFS_IBT_CRC_MAGIC): - case cpu_to_be32(XFS_FIBT_CRC_MAGIC): + if (xfs_sb_version_hascrc(&mp->m_sb)) { fa = xfs_btree_sblock_v5hdr_verify(bp); if (fa) return fa; - /* fall through */ - case cpu_to_be32(XFS_IBT_MAGIC): - case cpu_to_be32(XFS_FIBT_MAGIC): - break; - default: - return __this_address; } /* level verification */ @@ -328,6 +323,7 @@ xfs_inobt_write_verify( const struct xfs_buf_ops xfs_inobt_buf_ops = { .name = "xfs_inobt", + .magic = { XFS_IBT_MAGIC, XFS_IBT_CRC_MAGIC }, .verify_read = xfs_inobt_read_verify, .verify_write = xfs_inobt_write_verify, .verify_struct = xfs_inobt_verify, @@ -335,6 +331,7 @@ const struct xfs_buf_ops xfs_inobt_buf_ops = { const struct xfs_buf_ops xfs_finobt_buf_ops = { .name = "xfs_finobt", + .magic = { XFS_FIBT_MAGIC, XFS_FIBT_CRC_MAGIC }, .verify_read = xfs_inobt_read_verify, .verify_write = xfs_inobt_write_verify, .verify_struct = xfs_inobt_verify, diff --git a/fs/xfs/xfs_buf.h b/fs/xfs/xfs_buf.h index b9f5511ea998..d8757eafba71 100644 --- a/fs/xfs/xfs_buf.h +++ b/fs/xfs/xfs_buf.h @@ -125,6 +125,7 @@ struct xfs_buf_map { struct xfs_buf_ops { char *name; + uint32_t magic[2]; void (*verify_read)(struct xfs_buf *); void (*verify_write)(struct xfs_buf *); xfs_failaddr_t (*verify_struct)(struct xfs_buf *bp); @@ -387,4 +388,22 @@ extern int xfs_setsize_buftarg(xfs_buftarg_t *, unsigned int); int xfs_buf_ensure_ops(struct xfs_buf *bp, const struct xfs_buf_ops *ops); +/* + * Verify an on-disk magic value against the magic value specified in the + * verifier structure. + */ +static inline bool +xfs_buf_ops_verify_magic( + struct xfs_buf *bp, + __be32 dmagic, + bool crc) +{ + if (unlikely(WARN_ON(!bp->b_ops || !bp->b_ops->magic[crc]))) + return false; + return dmagic == cpu_to_be32(bp->b_ops->magic[crc]); +} +#define xfs_verify_magic(bp, dmagic) \ + xfs_buf_ops_verify_magic(bp, dmagic, \ + xfs_sb_version_hascrc(&bp->b_target->bt_mount->m_sb)) + #endif /* __XFS_BUF_H__ */ From patchwork Mon Jan 28 15:20:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Foster X-Patchwork-Id: 10783885 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 31B98139A for ; Mon, 28 Jan 2019 15:20:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 209DA2B09C for ; Mon, 28 Jan 2019 15:20:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1EB512B0D4; Mon, 28 Jan 2019 15:20:40 +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 9B0562B0CC for ; Mon, 28 Jan 2019 15:20:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726266AbfA1PUi (ORCPT ); Mon, 28 Jan 2019 10:20:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54108 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726813AbfA1PUh (ORCPT ); Mon, 28 Jan 2019 10:20:37 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0B5C9C7C3B for ; Mon, 28 Jan 2019 15:20:37 +0000 (UTC) Received: from bfoster.bos.redhat.com (dhcp-41-66.bos.redhat.com [10.18.41.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id A677B19E34 for ; Mon, 28 Jan 2019 15:20:36 +0000 (UTC) From: Brian Foster To: linux-xfs@vger.kernel.org Subject: [PATCH RFC v2 3/3] xfs: detect and warn about finobt blocks with an inobt magic value Date: Mon, 28 Jan 2019 10:20:34 -0500 Message-Id: <20190128152034.21080-4-bfoster@redhat.com> In-Reply-To: <20190128152034.21080-1-bfoster@redhat.com> References: <20190128152034.21080-1-bfoster@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 28 Jan 2019 15:20:37 +0000 (UTC) Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP xfs_repair had a bug where finobt reconstruction could create certain level > 0 nodes with an inobt magic. This went undetected by kernel verifiers because the inode btree verifiers were common between the inobt and finobt. Now that the verifiers enforce the appropriate magic value based on btree type, a mitigation strategy is necessary to avoid turning a low impact metadata inconsistency into an immediate and fatal runtime error. Add an explicit check for a finobt block with an inobt verifier to the [f]inobt structure verifier function. In the event that this occurs, report this as a warning rather than a verifier error to indicate to the user to upgrade xfsprogs and run xfs_repair. Note that without this change, an affected finobt filesystem will trigger a verifier error at mount time due to the perag reservation finobt scan and fail to mount. Also filter out this error from the lower level btree verification logic. This logic is what detected the problem in the first place, but can also cause an otherwise functional filesystem to fail. Note that while this logic has been around for some time, it hasn't always been active on non-debug kernels or triggered a runtime error. This means that the scarcity of error reports is not necessarily indicative of the prevalence of the problem in the field. Signed-off-by: Brian Foster --- fs/xfs/libxfs/xfs_btree.c | 12 ++++++++++-- fs/xfs/libxfs/xfs_ialloc_btree.c | 25 ++++++++++++++++++++++--- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/fs/xfs/libxfs/xfs_btree.c b/fs/xfs/libxfs/xfs_btree.c index bbdae2b4559f..6bb5882d69f3 100644 --- a/fs/xfs/libxfs/xfs_btree.c +++ b/fs/xfs/libxfs/xfs_btree.c @@ -132,6 +132,7 @@ __xfs_btree_check_sblock( struct xfs_mount *mp = cur->bc_mp; xfs_btnum_t btnum = cur->bc_btnum; int crc = xfs_sb_version_hascrc(&mp->m_sb); + uint32_t magic = xfs_btree_magic(crc, btnum); if (crc) { if (!uuid_equal(&block->bb_u.s.bb_uuid, &mp->m_sb.sb_meta_uuid)) @@ -141,8 +142,15 @@ __xfs_btree_check_sblock( return __this_address; } - if (be32_to_cpu(block->bb_magic) != xfs_btree_magic(crc, btnum)) - return __this_address; + /* + * Exclude the case of a finobt block with inobt magic from being an + * error. See the inobt verifier for further details. + */ + if (be32_to_cpu(block->bb_magic) != magic) { + if (!(magic == XFS_FIBT_CRC_MAGIC && + (be32_to_cpu(block->bb_magic) == XFS_IBT_CRC_MAGIC))) + return __this_address; + } if (be16_to_cpu(block->bb_level) != level) return __this_address; if (be16_to_cpu(block->bb_numrecs) > diff --git a/fs/xfs/libxfs/xfs_ialloc_btree.c b/fs/xfs/libxfs/xfs_ialloc_btree.c index c57ecb6b1255..79aafef42df6 100644 --- a/fs/xfs/libxfs/xfs_ialloc_btree.c +++ b/fs/xfs/libxfs/xfs_ialloc_btree.c @@ -259,9 +259,28 @@ xfs_inobt_verify( struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp); xfs_failaddr_t fa; unsigned int level; + bool hascrc = xfs_sb_version_hascrc(&mp->m_sb); - if (!xfs_verify_magic(bp, block->bb_magic)) - return __this_address; + /* + * xfs_repair had a bug that created interior finobt nodes with inobt + * magic values. This escaped verifier detection for some time because + * the verifier originally passed so long as the magic matched one of + * the several possible [f]inobt magic values. + * + * We now distinguish between magic values per tree, but we cannot + * outright fail as this would cause otherwise working filesystems to + * become unusable. Instead, warn the user to upgrade xfs_repair and fix + * the problem. + */ + if (!xfs_verify_magic(bp, block->bb_magic)) { + if ((bp->b_ops->magic[hascrc] == XFS_FIBT_CRC_MAGIC) && + (block->bb_magic == cpu_to_be32(XFS_IBT_CRC_MAGIC))) + xfs_warn(mp, +"WARNING: inobt magic on finobt block 0x%llx. This is caused by xfs_repair. " +"Please upgrade xfsprogs, unmount and run xfs_repair.", bp->b_bn); + else + return __this_address; + } /* * During growfs operations, we can't verify the exact owner as the @@ -273,7 +292,7 @@ xfs_inobt_verify( * but beware of the landmine (i.e. need to check pag->pagi_init) if we * ever do. */ - if (xfs_sb_version_hascrc(&mp->m_sb)) { + if (hascrc) { fa = xfs_btree_sblock_v5hdr_verify(bp); if (fa) return fa;