Lines Matching refs:sc
31 struct xfs_scrub *sc,
40 error = xchk_get_inode(sc, ip);
46 return xchk_trans_alloc(sc, 0);
52 sc->ilock_flags = XFS_IOLOCK_EXCL | XFS_MMAPLOCK_EXCL;
53 xfs_ilock(sc->ip, sc->ilock_flags);
54 error = xchk_trans_alloc(sc, 0);
57 sc->ilock_flags |= XFS_ILOCK_EXCL;
58 xfs_ilock(sc->ip, XFS_ILOCK_EXCL);
70 struct xfs_scrub *sc,
78 fa = xfs_inode_validate_extsize(sc->mp, be32_to_cpu(dip->di_extsize),
81 xchk_ino_set_corrupt(sc, ino);
92 struct xfs_scrub *sc,
101 fa = xfs_inode_validate_cowextsize(sc->mp,
105 xchk_ino_set_corrupt(sc, ino);
111 struct xfs_scrub *sc,
117 struct xfs_mount *mp = sc->mp;
150 xchk_ino_set_corrupt(sc, ino);
156 struct xfs_scrub *sc,
163 struct xfs_mount *mp = sc->mp;
167 xchk_ino_set_warning(sc, ino);
199 xchk_ino_set_corrupt(sc, ino);
204 struct xfs_scrub *sc,
213 xchk_ino_set_corrupt(sc, ino);
219 struct xfs_scrub *sc,
223 struct xfs_mount *mp = sc->mp;
250 xchk_ino_set_corrupt(sc, ino);
261 xchk_ino_set_preen(sc, ino);
266 xchk_ino_set_corrupt(sc, ino);
268 if (dip->di_mode == 0 && sc->ip)
269 xchk_ino_set_corrupt(sc, ino);
273 xchk_ino_set_corrupt(sc, ino);
276 xchk_ino_set_corrupt(sc, ino);
286 xchk_ino_set_warning(sc, ino);
293 xchk_ino_set_corrupt(sc, ino);
297 xchk_ino_set_corrupt(sc, ino);
301 xchk_ino_set_corrupt(sc, ino);
305 xchk_ino_set_corrupt(sc, ino);
309 xchk_ino_set_corrupt(sc, ino);
314 xchk_dinode_nsec(sc, ino, dip, dip->di_atime);
315 xchk_dinode_nsec(sc, ino, dip, dip->di_mtime);
316 xchk_dinode_nsec(sc, ino, dip, dip->di_ctime);
325 xchk_ino_set_corrupt(sc, ino);
329 xchk_ino_set_corrupt(sc, ino);
333 xchk_ino_set_corrupt(sc, ino);
337 xchk_ino_set_corrupt(sc, ino);
346 xchk_ino_set_warning(sc, ino);
361 xchk_ino_set_corrupt(sc, ino);
364 xchk_ino_set_corrupt(sc, ino);
367 xchk_inode_flags(sc, dip, ino, mode, flags);
369 xchk_inode_extsize(sc, dip, ino, mode, flags);
377 xchk_ino_set_corrupt(sc, ino);
381 xchk_ino_set_corrupt(sc, ino);
385 xchk_ino_set_corrupt(sc, ino);
391 xchk_ino_set_corrupt(sc, ino);
393 xchk_ino_set_corrupt(sc, ino);
395 xchk_ino_set_corrupt(sc, ino);
401 xchk_ino_set_corrupt(sc, ino);
409 xchk_ino_set_corrupt(sc, ino);
413 xchk_ino_set_corrupt(sc, ino);
417 xchk_ino_set_corrupt(sc, ino);
421 xchk_dinode_nsec(sc, ino, dip, dip->di_crtime);
422 xchk_inode_flags2(sc, dip, ino, mode, flags, flags2);
423 xchk_inode_cowextsize(sc, dip, ino, mode, flags,
435 struct xfs_scrub *sc,
443 if (!sc->sa.fino_cur || xchk_skip_xref(sc->sm))
446 agino = XFS_INO_TO_AGINO(sc->mp, ino);
452 error = xfs_inobt_lookup(sc->sa.fino_cur, agino, XFS_LOOKUP_LE,
454 if (!xchk_should_check_xref(sc, &error, &sc->sa.fino_cur) ||
458 error = xfs_inobt_get_rec(sc->sa.fino_cur, &rec, &has_record);
459 if (!xchk_should_check_xref(sc, &error, &sc->sa.fino_cur) ||
472 xchk_btree_xref_set_corrupt(sc, sc->sa.fino_cur, 0);
478 struct xfs_scrub *sc,
486 if (xchk_skip_xref(sc->sm))
490 error = xfs_bmap_count_blocks(sc->tp, sc->ip, XFS_DATA_FORK,
492 if (!xchk_should_check_xref(sc, &error, NULL))
495 xchk_ino_xref_set_corrupt(sc, sc->ip->i_ino);
497 error = xfs_bmap_count_blocks(sc->tp, sc->ip, XFS_ATTR_FORK,
499 if (!xchk_should_check_xref(sc, &error, NULL))
502 xchk_ino_xref_set_corrupt(sc, sc->ip->i_ino);
506 xchk_ino_xref_set_corrupt(sc, sc->ip->i_ino);
512 struct xfs_scrub *sc,
520 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
523 agno = XFS_INO_TO_AGNO(sc->mp, ino);
524 agbno = XFS_INO_TO_AGBNO(sc->mp, ino);
526 error = xchk_ag_init(sc, agno, &sc->sa);
527 if (!xchk_xref_process_error(sc, agno, agbno, &error))
530 xchk_xref_is_used_space(sc, agbno, 1);
531 xchk_inode_xref_finobt(sc, ino);
532 xchk_xref_is_owned_by(sc, agbno, 1, &XFS_RMAP_OINFO_INODES);
533 xchk_xref_is_not_shared(sc, agbno, 1);
534 xchk_inode_xref_bmap(sc, dip);
536 xchk_ag_free(sc, &sc->sa);
547 struct xfs_scrub *sc,
550 struct xfs_mount *mp = sc->mp;
557 error = xfs_reflink_inode_has_shared_extents(sc->tp, sc->ip,
559 if (!xchk_xref_process_error(sc, XFS_INO_TO_AGNO(mp, ino),
562 if (xfs_is_reflink_inode(sc->ip) && !has_shared)
563 xchk_ino_set_preen(sc, ino);
564 else if (!xfs_is_reflink_inode(sc->ip) && has_shared)
565 xchk_ino_set_corrupt(sc, ino);
571 struct xfs_scrub *sc)
577 * If sc->ip is NULL, that means that the setup function called
581 if (!sc->ip) {
582 xchk_ino_set_corrupt(sc, sc->sm->sm_ino);
587 xfs_inode_to_disk(sc->ip, &di, 0);
588 xchk_dinode(sc, &di, sc->ip->i_ino);
589 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
597 if (S_ISREG(VFS_I(sc->ip)->i_mode))
598 xchk_inode_check_reflink_iflag(sc, sc->ip->i_ino);
600 xchk_inode_xref(sc, sc->ip->i_ino, &di);