Lines Matching refs:sa

48 	error = xchk_ag_init_existing(sc, agno, &sc->sa);  in xchk_superblock_xref()
383 struct xfs_agf *agf = sc->sa.agf_bp->b_addr; in xchk_agf_xref_freeblks()
387 if (!sc->sa.bno_cur) in xchk_agf_xref_freeblks()
390 error = xfs_alloc_query_all(sc->sa.bno_cur, in xchk_agf_xref_freeblks()
392 if (!xchk_should_check_xref(sc, &error, &sc->sa.bno_cur)) in xchk_agf_xref_freeblks()
395 xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf_xref_freeblks()
403 struct xfs_agf *agf = sc->sa.agf_bp->b_addr; in xchk_agf_xref_cntbt()
409 if (!sc->sa.cnt_cur) in xchk_agf_xref_cntbt()
413 error = xfs_alloc_lookup_le(sc->sa.cnt_cur, 0, -1U, &have); in xchk_agf_xref_cntbt()
414 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()
423 error = xfs_alloc_get_rec(sc->sa.cnt_cur, &agbno, &blocks, &have); in xchk_agf_xref_cntbt()
424 if (!xchk_should_check_xref(sc, &error, &sc->sa.cnt_cur)) in xchk_agf_xref_cntbt()
427 xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf_xref_cntbt()
435 struct xfs_agf *agf = sc->sa.agf_bp->b_addr; in xchk_agf_xref_btreeblks()
446 if (sc->sa.rmap_cur) { in xchk_agf_xref_btreeblks()
447 error = xfs_btree_count_blocks(sc->sa.rmap_cur, &blocks); in xchk_agf_xref_btreeblks()
448 if (!xchk_should_check_xref(sc, &error, &sc->sa.rmap_cur)) in xchk_agf_xref_btreeblks()
452 xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf_xref_btreeblks()
461 if ((xfs_has_rmapbt(mp) && !sc->sa.rmap_cur) || in xchk_agf_xref_btreeblks()
462 !sc->sa.bno_cur || !sc->sa.cnt_cur) in xchk_agf_xref_btreeblks()
466 error = xfs_btree_count_blocks(sc->sa.bno_cur, &blocks); in xchk_agf_xref_btreeblks()
467 if (!xchk_should_check_xref(sc, &error, &sc->sa.bno_cur)) in xchk_agf_xref_btreeblks()
471 error = xfs_btree_count_blocks(sc->sa.cnt_cur, &blocks); in xchk_agf_xref_btreeblks()
472 if (!xchk_should_check_xref(sc, &error, &sc->sa.cnt_cur)) in xchk_agf_xref_btreeblks()
477 xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf_xref_btreeblks()
485 struct xfs_agf *agf = sc->sa.agf_bp->b_addr; in xchk_agf_xref_refcblks()
489 if (!sc->sa.refc_cur) in xchk_agf_xref_refcblks()
492 error = xfs_btree_count_blocks(sc->sa.refc_cur, &blocks); in xchk_agf_xref_refcblks()
493 if (!xchk_should_check_xref(sc, &error, &sc->sa.refc_cur)) in xchk_agf_xref_refcblks()
496 xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf_xref_refcblks()
512 xchk_ag_btcur_init(sc, &sc->sa); in xchk_agf_xref()
545 error = xchk_ag_read_headers(sc, agno, &sc->sa); in xchk_agf()
548 xchk_buffer_recheck(sc, sc->sa.agf_bp); in xchk_agf()
550 agf = sc->sa.agf_bp->b_addr; in xchk_agf()
551 pag = sc->sa.pag; in xchk_agf()
556 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
561 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()
573 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()
588 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
592 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
604 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
608 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
610 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
613 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agf()
662 if (xfs_verify_agbno(sc->sa.pag, agbno) && in xchk_agfl_block()
700 xchk_ag_btcur_init(sc, &sc->sa); in xchk_agfl_xref()
728 error = xchk_ag_read_headers(sc, agno, &sc->sa); in xchk_agfl()
731 if (!sc->sa.agf_bp) in xchk_agfl()
735 error = xfs_alloc_read_agfl(sc->sa.pag, sc->tp, &sai.agfl_bp); in xchk_agfl()
746 agf = sc->sa.agf_bp->b_addr; in xchk_agfl()
749 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agfl()
760 error = xfs_agfl_walk(sc->mp, sc->sa.agf_bp->b_addr, sai.agfl_bp, in xchk_agfl()
770 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agfl()
779 xchk_block_set_corrupt(sc, sc->sa.agf_bp); in xchk_agfl()
797 struct xfs_agi *agi = sc->sa.agi_bp->b_addr; in xchk_agi_xref_icounts()
802 if (!sc->sa.ino_cur) in xchk_agi_xref_icounts()
805 error = xfs_ialloc_count_inodes(sc->sa.ino_cur, &icount, &freecount); in xchk_agi_xref_icounts()
806 if (!xchk_should_check_xref(sc, &error, &sc->sa.ino_cur)) in xchk_agi_xref_icounts()
810 xchk_block_xref_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi_xref_icounts()
818 struct xfs_agi *agi = sc->sa.agi_bp->b_addr; in xchk_agi_xref_fiblocks()
825 if (sc->sa.ino_cur) { in xchk_agi_xref_fiblocks()
826 error = xfs_btree_count_blocks(sc->sa.ino_cur, &blocks); in xchk_agi_xref_fiblocks()
827 if (!xchk_should_check_xref(sc, &error, &sc->sa.ino_cur)) in xchk_agi_xref_fiblocks()
830 xchk_block_xref_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi_xref_fiblocks()
833 if (sc->sa.fino_cur) { in xchk_agi_xref_fiblocks()
834 error = xfs_btree_count_blocks(sc->sa.fino_cur, &blocks); in xchk_agi_xref_fiblocks()
835 if (!xchk_should_check_xref(sc, &error, &sc->sa.fino_cur)) in xchk_agi_xref_fiblocks()
838 xchk_block_xref_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi_xref_fiblocks()
855 xchk_ag_btcur_init(sc, &sc->sa); in xchk_agi_xref()
888 error = xchk_ag_read_headers(sc, agno, &sc->sa); in xchk_agi()
891 xchk_buffer_recheck(sc, sc->sa.agi_bp); in xchk_agi()
893 agi = sc->sa.agi_bp->b_addr; in xchk_agi()
894 pag = sc->sa.pag; in xchk_agi()
899 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
904 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
908 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
913 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()
925 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
930 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
934 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
940 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
944 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
948 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()
950 xchk_block_set_corrupt(sc, sc->sa.agi_bp); in xchk_agi()