• Home
  • Raw
  • Download

Lines Matching full:sc

32 	struct xfs_scrub	*sc,  in xchk_superblock_xref()  argument
36 struct xfs_mount *mp = sc->mp; in xchk_superblock_xref()
37 xfs_agnumber_t agno = sc->sm->sm_agno; in xchk_superblock_xref()
41 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_superblock_xref()
46 error = xchk_ag_init(sc, agno, &sc->sa); in xchk_superblock_xref()
47 if (!xchk_xref_process_error(sc, agno, agbno, &error)) in xchk_superblock_xref()
50 xchk_xref_is_used_space(sc, agbno, 1); in xchk_superblock_xref()
51 xchk_xref_is_not_inode_chunk(sc, agbno, 1); in xchk_superblock_xref()
53 xchk_xref_is_owned_by(sc, agbno, 1, &oinfo); in xchk_superblock_xref()
54 xchk_xref_is_not_shared(sc, agbno, 1); in xchk_superblock_xref()
56 /* scrub teardown will take care of sc->sa for us */ in xchk_superblock_xref()
69 struct xfs_scrub *sc) in xchk_superblock() argument
71 struct xfs_mount *mp = sc->mp; in xchk_superblock()
80 agno = sc->sm->sm_agno; in xchk_superblock()
84 error = xfs_sb_read_secondary(mp, sc->tp, agno, &bp); in xchk_superblock()
101 if (!xchk_process_error(sc, agno, XFS_SB_BLOCK(mp), &error)) in xchk_superblock()
113 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
116 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
119 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
122 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
125 xchk_block_set_preen(sc, bp); in xchk_superblock()
128 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
131 xchk_block_set_preen(sc, bp); in xchk_superblock()
134 xchk_block_set_preen(sc, bp); in xchk_superblock()
137 xchk_block_set_preen(sc, bp); in xchk_superblock()
140 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
143 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
146 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
149 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
152 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
166 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
174 xchk_block_set_preen(sc, bp); in xchk_superblock()
177 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
180 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
183 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
186 xchk_block_set_preen(sc, bp); in xchk_superblock()
189 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
192 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
195 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
198 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
201 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
204 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
207 xchk_block_set_preen(sc, bp); in xchk_superblock()
215 xchk_block_set_preen(sc, bp); in xchk_superblock()
218 xchk_block_set_preen(sc, bp); in xchk_superblock()
226 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
229 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
232 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
235 xchk_block_set_preen(sc, bp); in xchk_superblock()
238 xchk_block_set_preen(sc, bp); in xchk_superblock()
241 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
244 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
247 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
250 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
255 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
262 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
265 xchk_block_set_preen(sc, bp); in xchk_superblock()
275 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
281 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
288 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
294 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
304 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
314 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
321 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
326 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
329 xchk_block_set_preen(sc, bp); in xchk_superblock()
337 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
343 xchk_block_set_corrupt(sc, bp); in xchk_superblock()
345 xchk_superblock_xref(sc, bp); in xchk_superblock()
368 struct xfs_scrub *sc) in xchk_agf_xref_freeblks() argument
370 struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); in xchk_agf_xref_freeblks()
374 if (!sc->sa.bno_cur) in xchk_agf_xref_freeblks()
377 error = xfs_alloc_query_all(sc->sa.bno_cur, in xchk_agf_xref_freeblks()
379 if (!xchk_should_check_xref(sc, &error, &sc->sa.bno_cur)) in xchk_agf_xref_freeblks()
382 xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf_xref_freeblks()
388 struct xfs_scrub *sc) in xchk_agf_xref_cntbt() argument
390 struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); in xchk_agf_xref_cntbt()
396 if (!sc->sa.cnt_cur) in xchk_agf_xref_cntbt()
400 error = xfs_alloc_lookup_le(sc->sa.cnt_cur, 0, -1U, &have); in xchk_agf_xref_cntbt()
401 if (!xchk_should_check_xref(sc, &error, &sc->sa.cnt_cur)) in xchk_agf_xref_cntbt()
405 xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf_xref_cntbt()
410 error = xfs_alloc_get_rec(sc->sa.cnt_cur, &agbno, &blocks, &have); in xchk_agf_xref_cntbt()
411 if (!xchk_should_check_xref(sc, &error, &sc->sa.cnt_cur)) in xchk_agf_xref_cntbt()
414 xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf_xref_cntbt()
420 struct xfs_scrub *sc) in xchk_agf_xref_btreeblks() argument
422 struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); in xchk_agf_xref_btreeblks()
423 struct xfs_mount *mp = sc->mp; in xchk_agf_xref_btreeblks()
429 if (sc->sa.rmap_cur) { in xchk_agf_xref_btreeblks()
430 error = xfs_btree_count_blocks(sc->sa.rmap_cur, &blocks); in xchk_agf_xref_btreeblks()
431 if (!xchk_should_check_xref(sc, &error, &sc->sa.rmap_cur)) in xchk_agf_xref_btreeblks()
435 xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf_xref_btreeblks()
444 if ((xfs_sb_version_hasrmapbt(&mp->m_sb) && !sc->sa.rmap_cur) || in xchk_agf_xref_btreeblks()
445 !sc->sa.bno_cur || !sc->sa.cnt_cur) in xchk_agf_xref_btreeblks()
449 error = xfs_btree_count_blocks(sc->sa.bno_cur, &blocks); in xchk_agf_xref_btreeblks()
450 if (!xchk_should_check_xref(sc, &error, &sc->sa.bno_cur)) in xchk_agf_xref_btreeblks()
454 error = xfs_btree_count_blocks(sc->sa.cnt_cur, &blocks); in xchk_agf_xref_btreeblks()
455 if (!xchk_should_check_xref(sc, &error, &sc->sa.cnt_cur)) in xchk_agf_xref_btreeblks()
460 xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf_xref_btreeblks()
466 struct xfs_scrub *sc) in xchk_agf_xref_refcblks() argument
468 struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); in xchk_agf_xref_refcblks()
472 if (!sc->sa.refc_cur) in xchk_agf_xref_refcblks()
475 error = xfs_btree_count_blocks(sc->sa.refc_cur, &blocks); in xchk_agf_xref_refcblks()
476 if (!xchk_should_check_xref(sc, &error, &sc->sa.refc_cur)) in xchk_agf_xref_refcblks()
479 xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf_xref_refcblks()
485 struct xfs_scrub *sc) in xchk_agf_xref() argument
488 struct xfs_mount *mp = sc->mp; in xchk_agf_xref()
492 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_agf_xref()
497 error = xchk_ag_btcur_init(sc, &sc->sa); in xchk_agf_xref()
501 xchk_xref_is_used_space(sc, agbno, 1); in xchk_agf_xref()
502 xchk_agf_xref_freeblks(sc); in xchk_agf_xref()
503 xchk_agf_xref_cntbt(sc); in xchk_agf_xref()
504 xchk_xref_is_not_inode_chunk(sc, agbno, 1); in xchk_agf_xref()
506 xchk_xref_is_owned_by(sc, agbno, 1, &oinfo); in xchk_agf_xref()
507 xchk_agf_xref_btreeblks(sc); in xchk_agf_xref()
508 xchk_xref_is_not_shared(sc, agbno, 1); in xchk_agf_xref()
509 xchk_agf_xref_refcblks(sc); in xchk_agf_xref()
511 /* scrub teardown will take care of sc->sa for us */ in xchk_agf_xref()
517 struct xfs_scrub *sc) in xchk_agf() argument
519 struct xfs_mount *mp = sc->mp; in xchk_agf()
531 agno = sc->sa.agno = sc->sm->sm_agno; in xchk_agf()
532 error = xchk_ag_read_headers(sc, agno, &sc->sa.agi_bp, in xchk_agf()
533 &sc->sa.agf_bp, &sc->sa.agfl_bp); in xchk_agf()
534 if (!xchk_process_error(sc, agno, XFS_AGF_BLOCK(sc->mp), &error)) in xchk_agf()
536 xchk_buffer_recheck(sc, sc->sa.agf_bp); in xchk_agf()
538 agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); in xchk_agf()
543 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
548 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
552 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
556 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
560 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
565 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
569 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
575 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
579 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
591 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
593 xchk_agf_xref(sc); in xchk_agf()
605 struct xfs_scrub *sc; member
611 struct xfs_scrub *sc, in xchk_agfl_block_xref() argument
615 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_agfl_block_xref()
618 xchk_xref_is_used_space(sc, agbno, 1); in xchk_agfl_block_xref()
619 xchk_xref_is_not_inode_chunk(sc, agbno, 1); in xchk_agfl_block_xref()
620 xchk_xref_is_owned_by(sc, agbno, 1, oinfo); in xchk_agfl_block_xref()
621 xchk_xref_is_not_shared(sc, agbno, 1); in xchk_agfl_block_xref()
632 struct xfs_scrub *sc = sai->sc; in xchk_agfl_block() local
633 xfs_agnumber_t agno = sc->sa.agno; in xchk_agfl_block()
639 xchk_block_set_corrupt(sc, sc->sa.agfl_bp); in xchk_agfl_block()
641 xchk_agfl_block_xref(sc, agbno, priv); in xchk_agfl_block()
643 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_agfl_block()
663 struct xfs_scrub *sc) in xchk_agfl_xref() argument
666 struct xfs_mount *mp = sc->mp; in xchk_agfl_xref()
670 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_agfl_xref()
675 error = xchk_ag_btcur_init(sc, &sc->sa); in xchk_agfl_xref()
679 xchk_xref_is_used_space(sc, agbno, 1); in xchk_agfl_xref()
680 xchk_xref_is_not_inode_chunk(sc, agbno, 1); in xchk_agfl_xref()
682 xchk_xref_is_owned_by(sc, agbno, 1, &oinfo); in xchk_agfl_xref()
683 xchk_xref_is_not_shared(sc, agbno, 1); in xchk_agfl_xref()
686 * Scrub teardown will take care of sc->sa for us. Leave sc->sa in xchk_agfl_xref()
694 struct xfs_scrub *sc) in xchk_agfl() argument
703 agno = sc->sa.agno = sc->sm->sm_agno; in xchk_agfl()
704 error = xchk_ag_read_headers(sc, agno, &sc->sa.agi_bp, in xchk_agfl()
705 &sc->sa.agf_bp, &sc->sa.agfl_bp); in xchk_agfl()
706 if (!xchk_process_error(sc, agno, XFS_AGFL_BLOCK(sc->mp), &error)) in xchk_agfl()
708 if (!sc->sa.agf_bp) in xchk_agfl()
710 xchk_buffer_recheck(sc, sc->sa.agfl_bp); in xchk_agfl()
712 xchk_agfl_xref(sc); in xchk_agfl()
714 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_agfl()
718 agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); in xchk_agfl()
720 if (agflcount > xfs_agfl_size(sc->mp)) { in xchk_agfl()
721 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agfl()
725 sai.sc = sc; in xchk_agfl()
736 error = xfs_agfl_walk(sc->mp, XFS_BUF_TO_AGF(sc->sa.agf_bp), in xchk_agfl()
737 sc->sa.agfl_bp, xchk_agfl_block, &sai); in xchk_agfl()
746 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agfl()
755 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agfl()
771 struct xfs_scrub *sc) in xchk_agi_xref_icounts() argument
773 struct xfs_agi *agi = XFS_BUF_TO_AGI(sc->sa.agi_bp); in xchk_agi_xref_icounts()
778 if (!sc->sa.ino_cur) in xchk_agi_xref_icounts()
781 error = xfs_ialloc_count_inodes(sc->sa.ino_cur, &icount, &freecount); in xchk_agi_xref_icounts()
782 if (!xchk_should_check_xref(sc, &error, &sc->sa.ino_cur)) in xchk_agi_xref_icounts()
786 xchk_block_xref_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi_xref_icounts()
792 struct xfs_scrub *sc) in xchk_agi_xref() argument
795 struct xfs_mount *mp = sc->mp; in xchk_agi_xref()
799 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_agi_xref()
804 error = xchk_ag_btcur_init(sc, &sc->sa); in xchk_agi_xref()
808 xchk_xref_is_used_space(sc, agbno, 1); in xchk_agi_xref()
809 xchk_xref_is_not_inode_chunk(sc, agbno, 1); in xchk_agi_xref()
810 xchk_agi_xref_icounts(sc); in xchk_agi_xref()
812 xchk_xref_is_owned_by(sc, agbno, 1, &oinfo); in xchk_agi_xref()
813 xchk_xref_is_not_shared(sc, agbno, 1); in xchk_agi_xref()
815 /* scrub teardown will take care of sc->sa for us */ in xchk_agi_xref()
821 struct xfs_scrub *sc) in xchk_agi() argument
823 struct xfs_mount *mp = sc->mp; in xchk_agi()
836 agno = sc->sa.agno = sc->sm->sm_agno; in xchk_agi()
837 error = xchk_ag_read_headers(sc, agno, &sc->sa.agi_bp, in xchk_agi()
838 &sc->sa.agf_bp, &sc->sa.agfl_bp); in xchk_agi()
839 if (!xchk_process_error(sc, agno, XFS_AGI_BLOCK(sc->mp), &error)) in xchk_agi()
841 xchk_buffer_recheck(sc, sc->sa.agi_bp); in xchk_agi()
843 agi = XFS_BUF_TO_AGI(sc->sa.agi_bp); in xchk_agi()
848 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
853 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
857 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
862 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
866 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
874 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
879 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
883 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
891 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
895 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
897 xchk_agi_xref(sc); in xchk_agi()