Lines Matching refs:sa

39 	error = xchk_ag_init_existing(sc, agno, &sc->sa);  in xchk_superblock_xref()
374 struct xfs_agf *agf = sc->sa.agf_bp->b_addr; in xchk_agf_xref_freeblks()
378 if (!sc->sa.bno_cur) in xchk_agf_xref_freeblks()
381 error = xfs_alloc_query_all(sc->sa.bno_cur, in xchk_agf_xref_freeblks()
383 if (!xchk_should_check_xref(sc, &error, &sc->sa.bno_cur)) in xchk_agf_xref_freeblks()
386 xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf_xref_freeblks()
394 struct xfs_agf *agf = sc->sa.agf_bp->b_addr; in xchk_agf_xref_cntbt()
400 if (!sc->sa.cnt_cur) in xchk_agf_xref_cntbt()
404 error = xfs_alloc_lookup_le(sc->sa.cnt_cur, 0, -1U, &have); in xchk_agf_xref_cntbt()
405 if (!xchk_should_check_xref(sc, &error, &sc->sa.cnt_cur)) in xchk_agf_xref_cntbt()
409 xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf_xref_cntbt()
414 error = xfs_alloc_get_rec(sc->sa.cnt_cur, &agbno, &blocks, &have); in xchk_agf_xref_cntbt()
415 if (!xchk_should_check_xref(sc, &error, &sc->sa.cnt_cur)) in xchk_agf_xref_cntbt()
418 xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf_xref_cntbt()
426 struct xfs_agf *agf = sc->sa.agf_bp->b_addr; in xchk_agf_xref_btreeblks()
437 if (sc->sa.rmap_cur) { in xchk_agf_xref_btreeblks()
438 error = xfs_btree_count_blocks(sc->sa.rmap_cur, &blocks); in xchk_agf_xref_btreeblks()
439 if (!xchk_should_check_xref(sc, &error, &sc->sa.rmap_cur)) in xchk_agf_xref_btreeblks()
443 xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf_xref_btreeblks()
452 if ((xfs_has_rmapbt(mp) && !sc->sa.rmap_cur) || in xchk_agf_xref_btreeblks()
453 !sc->sa.bno_cur || !sc->sa.cnt_cur) in xchk_agf_xref_btreeblks()
457 error = xfs_btree_count_blocks(sc->sa.bno_cur, &blocks); in xchk_agf_xref_btreeblks()
458 if (!xchk_should_check_xref(sc, &error, &sc->sa.bno_cur)) in xchk_agf_xref_btreeblks()
462 error = xfs_btree_count_blocks(sc->sa.cnt_cur, &blocks); in xchk_agf_xref_btreeblks()
463 if (!xchk_should_check_xref(sc, &error, &sc->sa.cnt_cur)) in xchk_agf_xref_btreeblks()
468 xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf_xref_btreeblks()
476 struct xfs_agf *agf = sc->sa.agf_bp->b_addr; in xchk_agf_xref_refcblks()
480 if (!sc->sa.refc_cur) in xchk_agf_xref_refcblks()
483 error = xfs_btree_count_blocks(sc->sa.refc_cur, &blocks); in xchk_agf_xref_refcblks()
484 if (!xchk_should_check_xref(sc, &error, &sc->sa.refc_cur)) in xchk_agf_xref_refcblks()
487 xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf_xref_refcblks()
503 xchk_ag_btcur_init(sc, &sc->sa); in xchk_agf_xref()
535 error = xchk_ag_read_headers(sc, agno, &sc->sa); in xchk_agf()
538 xchk_buffer_recheck(sc, sc->sa.agf_bp); in xchk_agf()
540 agf = sc->sa.agf_bp->b_addr; in xchk_agf()
541 pag = sc->sa.pag; in xchk_agf()
546 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
551 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
555 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
559 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
563 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
568 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
572 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
578 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
582 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
594 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
598 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
600 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
603 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
643 xfs_agnumber_t agno = sc->sa.pag->pag_agno; in xchk_agfl_block()
649 xchk_block_set_corrupt(sc, sc->sa.agfl_bp); in xchk_agfl_block()
683 xchk_ag_btcur_init(sc, &sc->sa); in xchk_agfl_xref()
708 error = xchk_ag_read_headers(sc, agno, &sc->sa); in xchk_agfl()
711 if (!sc->sa.agf_bp) in xchk_agfl()
713 xchk_buffer_recheck(sc, sc->sa.agfl_bp); in xchk_agfl()
721 agf = sc->sa.agf_bp->b_addr; in xchk_agfl()
724 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agfl()
738 error = xfs_agfl_walk(sc->mp, sc->sa.agf_bp->b_addr, in xchk_agfl()
739 sc->sa.agfl_bp, xchk_agfl_block, &sai); in xchk_agfl()
748 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agfl()
757 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agfl()
775 struct xfs_agi *agi = sc->sa.agi_bp->b_addr; in xchk_agi_xref_icounts()
780 if (!sc->sa.ino_cur) in xchk_agi_xref_icounts()
783 error = xfs_ialloc_count_inodes(sc->sa.ino_cur, &icount, &freecount); in xchk_agi_xref_icounts()
784 if (!xchk_should_check_xref(sc, &error, &sc->sa.ino_cur)) in xchk_agi_xref_icounts()
788 xchk_block_xref_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi_xref_icounts()
796 struct xfs_agi *agi = sc->sa.agi_bp->b_addr; in xchk_agi_xref_fiblocks()
803 if (sc->sa.ino_cur) { in xchk_agi_xref_fiblocks()
804 error = xfs_btree_count_blocks(sc->sa.ino_cur, &blocks); in xchk_agi_xref_fiblocks()
805 if (!xchk_should_check_xref(sc, &error, &sc->sa.ino_cur)) in xchk_agi_xref_fiblocks()
808 xchk_block_xref_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi_xref_fiblocks()
811 if (sc->sa.fino_cur) { in xchk_agi_xref_fiblocks()
812 error = xfs_btree_count_blocks(sc->sa.fino_cur, &blocks); in xchk_agi_xref_fiblocks()
813 if (!xchk_should_check_xref(sc, &error, &sc->sa.fino_cur)) in xchk_agi_xref_fiblocks()
816 xchk_block_xref_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi_xref_fiblocks()
833 xchk_ag_btcur_init(sc, &sc->sa); in xchk_agi_xref()
865 error = xchk_ag_read_headers(sc, agno, &sc->sa); in xchk_agi()
868 xchk_buffer_recheck(sc, sc->sa.agi_bp); in xchk_agi()
870 agi = sc->sa.agi_bp->b_addr; in xchk_agi()
871 pag = sc->sa.pag; in xchk_agi()
876 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
881 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
885 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
890 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
894 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
902 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
907 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
911 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
917 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
921 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
925 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
927 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()