/* Cross-reference with the other btrees. */ STATIC void xchk_inode_xref( struct xfs_scrub *sc, xfs_ino_t ino, struct xfs_dinode *dip) { struct xfs_owner_info oinfo; xfs_agnumber_t agno; xfs_agblock_t agbno; int error; if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) return; agno = XFS_INO_TO_AGNO(sc->mp, ino); agbno = XFS_INO_TO_AGBNO(sc->mp, ino); error = xchk_ag_init(sc, agno, &sc->sa); if (!xchk_xref_process_error(sc, agno, agbno, &error)) return; xchk_xref_is_used_space(sc, agbno, 1); xchk_inode_xref_finobt(sc, ino); xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_INODES); xchk_xref_is_owned_by(sc, agbno, 1, &oinfo); xchk_xref_is_not_shared(sc, agbno, 1); xchk_inode_xref_bmap(sc, dip); xchk_ag_free(sc, &sc->sa); }
/* Cross-reference with the other btrees. */ STATIC void xchk_iallocbt_chunk_xref( struct xfs_scrub *sc, struct xfs_inobt_rec_incore *irec, xfs_agino_t agino, xfs_agblock_t agbno, xfs_extlen_t len) { if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) return; xchk_xref_is_used_space(sc, agbno, len); xchk_iallocbt_chunk_xref_other(sc, irec, agino); xchk_xref_is_owned_by(sc, agbno, len, &XFS_RMAP_OINFO_INODES); xchk_xref_is_not_shared(sc, agbno, len); }