Lines Matching refs:irec
45 struct xfs_rmap_irec *irec) in xchk_rmapbt_xref_refc() argument
58 non_inode = XFS_RMAP_NON_INODE_OWNER(irec->rm_owner); in xchk_rmapbt_xref_refc()
59 is_bmbt = irec->rm_flags & XFS_RMAP_BMBT_BLOCK; in xchk_rmapbt_xref_refc()
60 is_attr = irec->rm_flags & XFS_RMAP_ATTR_FORK; in xchk_rmapbt_xref_refc()
61 is_unwritten = irec->rm_flags & XFS_RMAP_UNWRITTEN; in xchk_rmapbt_xref_refc()
64 error = xfs_refcount_find_shared(sc->sa.refc_cur, irec->rm_startblock, in xchk_rmapbt_xref_refc()
65 irec->rm_blockcount, &fbno, &flen, false); in xchk_rmapbt_xref_refc()
76 struct xfs_rmap_irec *irec) in xchk_rmapbt_xref() argument
78 xfs_agblock_t agbno = irec->rm_startblock; in xchk_rmapbt_xref()
79 xfs_extlen_t len = irec->rm_blockcount; in xchk_rmapbt_xref()
85 if (irec->rm_owner == XFS_RMAP_OWN_INODES) in xchk_rmapbt_xref()
89 if (irec->rm_owner == XFS_RMAP_OWN_COW) in xchk_rmapbt_xref()
90 xchk_xref_is_cow_staging(sc, irec->rm_startblock, in xchk_rmapbt_xref()
91 irec->rm_blockcount); in xchk_rmapbt_xref()
93 xchk_rmapbt_xref_refc(sc, irec); in xchk_rmapbt_xref()
103 struct xfs_rmap_irec irec; in xchk_rmapbt_rec() local
111 error = xfs_rmap_btrec_to_irec(rec, &irec); in xchk_rmapbt_rec()
116 if (irec.rm_startblock + irec.rm_blockcount <= irec.rm_startblock) in xchk_rmapbt_rec()
119 if (irec.rm_owner == XFS_RMAP_OWN_FS) { in xchk_rmapbt_rec()
125 if (irec.rm_startblock != 0 || in xchk_rmapbt_rec()
126 irec.rm_blockcount != XFS_AGFL_BLOCK(mp) + 1) in xchk_rmapbt_rec()
133 if (!xfs_verify_agbno(mp, agno, irec.rm_startblock) || in xchk_rmapbt_rec()
134 !xfs_verify_agbno(mp, agno, irec.rm_startblock + in xchk_rmapbt_rec()
135 irec.rm_blockcount - 1)) in xchk_rmapbt_rec()
140 non_inode = XFS_RMAP_NON_INODE_OWNER(irec.rm_owner); in xchk_rmapbt_rec()
141 is_bmbt = irec.rm_flags & XFS_RMAP_BMBT_BLOCK; in xchk_rmapbt_rec()
142 is_attr = irec.rm_flags & XFS_RMAP_ATTR_FORK; in xchk_rmapbt_rec()
143 is_unwritten = irec.rm_flags & XFS_RMAP_UNWRITTEN; in xchk_rmapbt_rec()
145 if (is_bmbt && irec.rm_offset != 0) in xchk_rmapbt_rec()
148 if (non_inode && irec.rm_offset != 0) in xchk_rmapbt_rec()
158 if (!xfs_verify_ino(mp, irec.rm_owner)) in xchk_rmapbt_rec()
162 if (irec.rm_owner <= XFS_RMAP_OWN_MIN || in xchk_rmapbt_rec()
163 irec.rm_owner > XFS_RMAP_OWN_FS) in xchk_rmapbt_rec()
167 xchk_rmapbt_xref(bs->sc, &irec); in xchk_rmapbt_rec()