/* Record a corruption while cross-referencing with an inode. */
void
-xchk_ino_xref_set_corrupt(
+xchk_ip_xref_set_corrupt(
struct xfs_scrub *sc,
- xfs_ino_t ino)
+ struct xfs_inode *ip)
{
sc->sm->sm_flags |= XFS_SCRUB_OFLAG_XCORRUPT;
- trace_xchk_ino_error(sc, ino, __return_address);
+ trace_xchk_ino_error(sc, ip->i_ino, __return_address);
}
/* Record corruption in a block indexed by a file fork. */
void xchk_block_xref_set_corrupt(struct xfs_scrub *sc,
struct xfs_buf *bp);
-void xchk_ino_xref_set_corrupt(struct xfs_scrub *sc,
- xfs_ino_t ino);
+void xchk_ip_xref_set_corrupt(struct xfs_scrub *sc,
+ struct xfs_inode *ip);
void xchk_fblock_xref_set_corrupt(struct xfs_scrub *sc,
int whichfork, xfs_fileoff_t offset);
* parent pointers are corrupt; this scan cannot be completed
* without full information.
*/
- xchk_ino_xref_set_corrupt(sc, sc->ip->i_ino);
+ xchk_ip_xref_set_corrupt(sc, sc->ip);
error = 0;
goto out_scanlock;
}
if (oc.bad || oc.good + oc.suspect != 1)
xchk_ip_set_corrupt(sc, sc->ip);
if (oc.suspect)
- xchk_ino_xref_set_corrupt(sc, sc->ip->i_ino);
+ xchk_ip_xref_set_corrupt(sc, sc->ip);
}
out_scanlock:
if (!xchk_should_check_xref(sc, &error, NULL))
return;
if (nextents < xfs_dfork_data_extents(dip))
- xchk_ino_xref_set_corrupt(sc, sc->ip->i_ino);
+ xchk_ip_xref_set_corrupt(sc, sc->ip);
error = xchk_inode_count_blocks(sc, XFS_ATTR_FORK, &nextents, &acount);
if (!xchk_should_check_xref(sc, &error, NULL))
return;
if (nextents != xfs_dfork_attr_extents(dip))
- xchk_ino_xref_set_corrupt(sc, sc->ip->i_ino);
+ xchk_ip_xref_set_corrupt(sc, sc->ip);
/* Check nblocks against the inode. */
if (count + acount != be64_to_cpu(dip->di_nblocks))
- xchk_ino_xref_set_corrupt(sc, sc->ip->i_ino);
+ xchk_ip_xref_set_corrupt(sc, sc->ip);
}
/* Cross-reference with the other btrees. */
* number of subdirectory entries in the directory.
*/
if (obs.children != obs.backrefs)
- xchk_ino_xref_set_corrupt(sc, ip->i_ino);
+ xchk_ip_xref_set_corrupt(sc, ip);
} else {
/*
* Non-directories and unlinked directories should not have
if (xfs_has_zoned(sc->mp)) {
if (!xfs_zone_rgbno_is_valid(rtg,
xfs_rtb_to_rgbno(sc->mp, rtbno) + len - 1))
- xchk_ino_xref_set_corrupt(sc, rtg_rmap(rtg)->i_ino);
+ xchk_ip_xref_set_corrupt(sc, rtg_rmap(rtg));
return;
}
if (!xchk_should_check_xref(sc, &error, NULL))
return;
if (is_free)
- xchk_ino_xref_set_corrupt(sc, rtg_bitmap(rtg)->i_ino);
+ xchk_ip_xref_set_corrupt(sc, rtg_bitmap(rtg));
}
rtlen = xfs_rtxlen_to_extlen(mp, rec->ar_extcount);
if (!xfs_verify_rtbext(mp, rtbno, rtlen)) {
- xchk_ino_xref_set_corrupt(sc, rtg_bitmap(rtg)->i_ino);
+ xchk_ip_xref_set_corrupt(sc, rtg_bitmap(rtg));
return -EFSCORRUPTED;
}