Lines Matching full:sa

49 	error = xchk_ag_init_existing(sc, agno, &sc->sa);  in xchk_superblock_xref()
59 /* scrub teardown will take care of sc->sa for us */ in xchk_superblock_xref()
448 struct xfs_agf *agf = sc->sa.agf_bp->b_addr; in xchk_agf_xref_freeblks()
452 if (!sc->sa.bno_cur) in xchk_agf_xref_freeblks()
455 error = xfs_alloc_query_all(sc->sa.bno_cur, in xchk_agf_xref_freeblks()
457 if (!xchk_should_check_xref(sc, &error, &sc->sa.bno_cur)) in xchk_agf_xref_freeblks()
460 xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf_xref_freeblks()
468 struct xfs_agf *agf = sc->sa.agf_bp->b_addr; in xchk_agf_xref_cntbt()
474 if (!sc->sa.cnt_cur) in xchk_agf_xref_cntbt()
478 error = xfs_alloc_lookup_le(sc->sa.cnt_cur, 0, -1U, &have); in xchk_agf_xref_cntbt()
479 if (!xchk_should_check_xref(sc, &error, &sc->sa.cnt_cur)) in xchk_agf_xref_cntbt()
483 xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf_xref_cntbt()
488 error = xfs_alloc_get_rec(sc->sa.cnt_cur, &agbno, &blocks, &have); in xchk_agf_xref_cntbt()
489 if (!xchk_should_check_xref(sc, &error, &sc->sa.cnt_cur)) in xchk_agf_xref_cntbt()
492 xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf_xref_cntbt()
500 struct xfs_agf *agf = sc->sa.agf_bp->b_addr; in xchk_agf_xref_btreeblks()
511 if (sc->sa.rmap_cur) { in xchk_agf_xref_btreeblks()
512 error = xfs_btree_count_blocks(sc->sa.rmap_cur, &blocks); in xchk_agf_xref_btreeblks()
513 if (!xchk_should_check_xref(sc, &error, &sc->sa.rmap_cur)) in xchk_agf_xref_btreeblks()
517 xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf_xref_btreeblks()
526 if ((xfs_has_rmapbt(mp) && !sc->sa.rmap_cur) || in xchk_agf_xref_btreeblks()
527 !sc->sa.bno_cur || !sc->sa.cnt_cur) in xchk_agf_xref_btreeblks()
531 error = xfs_btree_count_blocks(sc->sa.bno_cur, &blocks); in xchk_agf_xref_btreeblks()
532 if (!xchk_should_check_xref(sc, &error, &sc->sa.bno_cur)) in xchk_agf_xref_btreeblks()
536 error = xfs_btree_count_blocks(sc->sa.cnt_cur, &blocks); in xchk_agf_xref_btreeblks()
537 if (!xchk_should_check_xref(sc, &error, &sc->sa.cnt_cur)) in xchk_agf_xref_btreeblks()
542 xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf_xref_btreeblks()
550 struct xfs_agf *agf = sc->sa.agf_bp->b_addr; in xchk_agf_xref_refcblks()
554 if (!sc->sa.refc_cur) in xchk_agf_xref_refcblks()
557 error = xfs_btree_count_blocks(sc->sa.refc_cur, &blocks); in xchk_agf_xref_refcblks()
558 if (!xchk_should_check_xref(sc, &error, &sc->sa.refc_cur)) in xchk_agf_xref_refcblks()
561 xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf_xref_refcblks()
577 xchk_ag_btcur_init(sc, &sc->sa); in xchk_agf_xref()
589 /* scrub teardown will take care of sc->sa for us */ in xchk_agf_xref()
610 error = xchk_ag_read_headers(sc, agno, &sc->sa); in xchk_agf()
613 xchk_buffer_recheck(sc, sc->sa.agf_bp); in xchk_agf()
615 agf = sc->sa.agf_bp->b_addr; in xchk_agf()
616 pag = sc->sa.pag; in xchk_agf()
621 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
626 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
630 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
634 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
638 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
643 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
647 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
653 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
657 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
669 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
673 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
675 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
678 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
727 if (xfs_verify_agbno(sc->sa.pag, agbno) && in xchk_agfl_block()
765 xchk_ag_btcur_init(sc, &sc->sa); in xchk_agfl_xref()
774 * Scrub teardown will take care of sc->sa for us. Leave sc->sa in xchk_agfl_xref()
793 error = xchk_ag_read_headers(sc, agno, &sc->sa); in xchk_agfl()
796 if (!sc->sa.agf_bp) in xchk_agfl()
800 error = xfs_alloc_read_agfl(sc->sa.pag, sc->tp, &sai.agfl_bp); in xchk_agfl()
811 agf = sc->sa.agf_bp->b_addr; in xchk_agfl()
814 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agfl()
825 error = xfs_agfl_walk(sc->mp, sc->sa.agf_bp->b_addr, sai.agfl_bp, in xchk_agfl()
835 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agfl()
844 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agfl()
862 struct xfs_agi *agi = sc->sa.agi_bp->b_addr; in xchk_agi_xref_icounts()
867 if (!sc->sa.ino_cur) in xchk_agi_xref_icounts()
870 error = xfs_ialloc_count_inodes(sc->sa.ino_cur, &icount, &freecount); in xchk_agi_xref_icounts()
871 if (!xchk_should_check_xref(sc, &error, &sc->sa.ino_cur)) in xchk_agi_xref_icounts()
875 xchk_block_xref_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi_xref_icounts()
883 struct xfs_agi *agi = sc->sa.agi_bp->b_addr; in xchk_agi_xref_fiblocks()
890 if (sc->sa.ino_cur) { in xchk_agi_xref_fiblocks()
891 error = xfs_btree_count_blocks(sc->sa.ino_cur, &blocks); in xchk_agi_xref_fiblocks()
892 if (!xchk_should_check_xref(sc, &error, &sc->sa.ino_cur)) in xchk_agi_xref_fiblocks()
895 xchk_block_xref_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi_xref_fiblocks()
898 if (sc->sa.fino_cur) { in xchk_agi_xref_fiblocks()
899 error = xfs_btree_count_blocks(sc->sa.fino_cur, &blocks); in xchk_agi_xref_fiblocks()
900 if (!xchk_should_check_xref(sc, &error, &sc->sa.fino_cur)) in xchk_agi_xref_fiblocks()
903 xchk_block_xref_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi_xref_fiblocks()
920 xchk_ag_btcur_init(sc, &sc->sa); in xchk_agi_xref()
930 /* scrub teardown will take care of sc->sa for us */ in xchk_agi_xref()
950 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_iunlink()
954 ip = xfs_iunlink_lookup(sc->sa.pag, agino); in xchk_iunlink()
956 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_iunlink()
961 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_iunlink()
990 error = xchk_ag_read_headers(sc, agno, &sc->sa); in xchk_agi()
993 xchk_buffer_recheck(sc, sc->sa.agi_bp); in xchk_agi()
995 agi = sc->sa.agi_bp->b_addr; in xchk_agi()
996 pag = sc->sa.pag; in xchk_agi()
1001 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
1006 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
1010 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
1015 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
1019 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
1027 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
1032 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
1036 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
1042 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
1046 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
1050 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
1052 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()