refcount.c (a23e1966932464e1c5226cb9ac4ce1d5fc10ba22) refcount.c (77a530e6c49d22bd4a221d2f059db24fc30094db)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (C) 2017-2023 Oracle. All Rights Reserved.
4 * Author: Darrick J. Wong <djwong@kernel.org>
5 */
6#include "xfs.h"
7#include "xfs_fs.h"
8#include "xfs_shared.h"

--- 439 unchanged lines hidden (view full) ---

448xchk_refcountbt_rec(
449 struct xchk_btree *bs,
450 const union xfs_btree_rec *rec)
451{
452 struct xfs_refcount_irec irec;
453 struct xchk_refcbt_records *rrc = bs->private;
454
455 xfs_refcount_btrec_to_irec(rec, &irec);
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (C) 2017-2023 Oracle. All Rights Reserved.
4 * Author: Darrick J. Wong <djwong@kernel.org>
5 */
6#include "xfs.h"
7#include "xfs_fs.h"
8#include "xfs_shared.h"

--- 439 unchanged lines hidden (view full) ---

448xchk_refcountbt_rec(
449 struct xchk_btree *bs,
450 const union xfs_btree_rec *rec)
451{
452 struct xfs_refcount_irec irec;
453 struct xchk_refcbt_records *rrc = bs->private;
454
455 xfs_refcount_btrec_to_irec(rec, &irec);
456 if (xfs_refcount_check_irec(bs->cur->bc_ag.pag, &irec) != NULL) {
456 if (xfs_refcount_check_irec(to_perag(bs->cur->bc_group), &irec) !=
457 NULL) {
457 xchk_btree_set_corrupt(bs->sc, bs->cur, 0);
458 return 0;
459 }
460
461 if (irec.rc_domain == XFS_REFC_DOMAIN_COW)
462 rrc->cow_blocks += irec.rc_blockcount;
463
464 /* Shared records always come before CoW records. */

--- 168 unchanged lines hidden ---
458 xchk_btree_set_corrupt(bs->sc, bs->cur, 0);
459 return 0;
460 }
461
462 if (irec.rc_domain == XFS_REFC_DOMAIN_COW)
463 rrc->cow_blocks += irec.rc_blockcount;
464
465 /* Shared records always come before CoW records. */

--- 168 unchanged lines hidden ---