Lines Matching refs:agf
773 struct xfs_agf *agf = agbp->b_addr; in xfs_alloc_update_counters() local
776 be32_add_cpu(&agf->agf_freeblks, len); in xfs_alloc_update_counters()
778 if (unlikely(be32_to_cpu(agf->agf_freeblks) > in xfs_alloc_update_counters()
779 be32_to_cpu(agf->agf_length))) { in xfs_alloc_update_counters()
978 struct xfs_agf __maybe_unused *agf = args->agbp->b_addr; in xfs_alloc_cur_finish() local
984 ASSERT(acur->rec_bno + acur->rec_len <= be32_to_cpu(agf->agf_length)); in xfs_alloc_cur_finish()
1082 struct xfs_agf *agf = args->agbp->b_addr; in xfs_alloc_ag_vextent_small() local
1111 be32_to_cpu(agf->agf_flcount) <= args->minleft) in xfs_alloc_ag_vextent_small()
1136 if (XFS_IS_CORRUPT(args->mp, fbno >= be32_to_cpu(agf->agf_length))) { in xfs_alloc_ag_vextent_small()
1185 struct xfs_agf __maybe_unused *agf = args->agbp->b_addr; in xfs_alloc_ag_vextent_exact() local
1264 ASSERT(args->agbno + args->len <= be32_to_cpu(agf->agf_length)); in xfs_alloc_ag_vextent_exact()
1657 struct xfs_agf *agf = args->agbp->b_addr; in xfs_alloc_ag_vextent_size() local
1867 be32_to_cpu(agf->agf_length))) { in xfs_alloc_ag_vextent_size()
2410 struct xfs_agf *agf) in xfs_agfl_needs_reset() argument
2412 uint32_t f = be32_to_cpu(agf->agf_flfirst); in xfs_agfl_needs_reset()
2413 uint32_t l = be32_to_cpu(agf->agf_fllast); in xfs_agfl_needs_reset()
2414 uint32_t c = be32_to_cpu(agf->agf_flcount); in xfs_agfl_needs_reset()
2459 struct xfs_agf *agf = agbp->b_addr; in xfs_agfl_reset() local
2462 trace_xfs_agfl_reset(mp, agf, 0, _RET_IP_); in xfs_agfl_reset()
2469 agf->agf_flfirst = 0; in xfs_agfl_reset()
2470 agf->agf_fllast = cpu_to_be32(xfs_agfl_size(mp) - 1); in xfs_agfl_reset()
2471 agf->agf_flcount = 0; in xfs_agfl_reset()
2827 struct xfs_agf *agf = agbp->b_addr; in xfs_alloc_get_freelist() local
2838 if (!agf->agf_flcount) { in xfs_alloc_get_freelist()
2854 bno = be32_to_cpu(agfl_bno[be32_to_cpu(agf->agf_flfirst)]); in xfs_alloc_get_freelist()
2858 be32_add_cpu(&agf->agf_flfirst, 1); in xfs_alloc_get_freelist()
2860 if (be32_to_cpu(agf->agf_flfirst) == xfs_agfl_size(mp)) in xfs_alloc_get_freelist()
2861 agf->agf_flfirst = 0; in xfs_alloc_get_freelist()
2864 be32_add_cpu(&agf->agf_flcount, -1); in xfs_alloc_get_freelist()
2869 be32_add_cpu(&agf->agf_btreeblks, 1); in xfs_alloc_get_freelist()
2935 struct xfs_agf *agf = agbp->b_addr; in xfs_alloc_put_freelist() local
2948 be32_add_cpu(&agf->agf_fllast, 1); in xfs_alloc_put_freelist()
2949 if (be32_to_cpu(agf->agf_fllast) == xfs_agfl_size(mp)) in xfs_alloc_put_freelist()
2950 agf->agf_fllast = 0; in xfs_alloc_put_freelist()
2953 be32_add_cpu(&agf->agf_flcount, 1); in xfs_alloc_put_freelist()
2958 be32_add_cpu(&agf->agf_btreeblks, -1); in xfs_alloc_put_freelist()
2965 ASSERT(be32_to_cpu(agf->agf_flcount) <= xfs_agfl_size(mp)); in xfs_alloc_put_freelist()
2968 blockp = &agfl_bno[be32_to_cpu(agf->agf_fllast)]; in xfs_alloc_put_freelist()
3039 struct xfs_agf *agf = bp->b_addr; in xfs_agf_verify() local
3041 uint32_t agf_seqno = be32_to_cpu(agf->agf_seqno); in xfs_agf_verify()
3042 uint32_t agf_length = be32_to_cpu(agf->agf_length); in xfs_agf_verify()
3045 if (!uuid_equal(&agf->agf_uuid, &mp->m_sb.sb_meta_uuid)) in xfs_agf_verify()
3047 if (!xfs_log_check_lsn(mp, be64_to_cpu(agf->agf_lsn))) in xfs_agf_verify()
3051 if (!xfs_verify_magic(bp, agf->agf_magicnum)) in xfs_agf_verify()
3054 if (!XFS_AGF_GOOD_VERSION(be32_to_cpu(agf->agf_versionnum))) in xfs_agf_verify()
3065 if (be32_to_cpu(agf->agf_flfirst) >= xfs_agfl_size(mp)) in xfs_agf_verify()
3067 if (be32_to_cpu(agf->agf_fllast) >= xfs_agfl_size(mp)) in xfs_agf_verify()
3069 if (be32_to_cpu(agf->agf_flcount) > xfs_agfl_size(mp)) in xfs_agf_verify()
3072 if (be32_to_cpu(agf->agf_freeblks) < be32_to_cpu(agf->agf_longest) || in xfs_agf_verify()
3073 be32_to_cpu(agf->agf_freeblks) > agf_length) in xfs_agf_verify()
3076 if (be32_to_cpu(agf->agf_levels[XFS_BTNUM_BNO]) < 1 || in xfs_agf_verify()
3077 be32_to_cpu(agf->agf_levels[XFS_BTNUM_CNT]) < 1 || in xfs_agf_verify()
3078 be32_to_cpu(agf->agf_levels[XFS_BTNUM_BNO]) > in xfs_agf_verify()
3080 be32_to_cpu(agf->agf_levels[XFS_BTNUM_CNT]) > in xfs_agf_verify()
3085 be32_to_cpu(agf->agf_btreeblks) > agf_length) in xfs_agf_verify()
3089 if (be32_to_cpu(agf->agf_rmap_blocks) > agf_length) in xfs_agf_verify()
3092 if (be32_to_cpu(agf->agf_levels[XFS_BTNUM_RMAP]) < 1 || in xfs_agf_verify()
3093 be32_to_cpu(agf->agf_levels[XFS_BTNUM_RMAP]) > in xfs_agf_verify()
3099 if (be32_to_cpu(agf->agf_refcount_blocks) > agf_length) in xfs_agf_verify()
3102 if (be32_to_cpu(agf->agf_refcount_level) < 1 || in xfs_agf_verify()
3103 be32_to_cpu(agf->agf_refcount_level) > mp->m_refc_maxlevels) in xfs_agf_verify()
3133 struct xfs_agf *agf = bp->b_addr; in xfs_agf_write_verify() local
3146 agf->agf_lsn = cpu_to_be64(bip->bli_item.li_lsn); in xfs_agf_write_verify()
3197 struct xfs_agf *agf; in xfs_alloc_read_agf() local
3212 agf = agfbp->b_addr; in xfs_alloc_read_agf()
3214 pag->pagf_freeblks = be32_to_cpu(agf->agf_freeblks); in xfs_alloc_read_agf()
3215 pag->pagf_btreeblks = be32_to_cpu(agf->agf_btreeblks); in xfs_alloc_read_agf()
3216 pag->pagf_flcount = be32_to_cpu(agf->agf_flcount); in xfs_alloc_read_agf()
3217 pag->pagf_longest = be32_to_cpu(agf->agf_longest); in xfs_alloc_read_agf()
3219 be32_to_cpu(agf->agf_levels[XFS_BTNUM_BNOi]); in xfs_alloc_read_agf()
3221 be32_to_cpu(agf->agf_levels[XFS_BTNUM_CNTi]); in xfs_alloc_read_agf()
3223 be32_to_cpu(agf->agf_levels[XFS_BTNUM_RMAPi]); in xfs_alloc_read_agf()
3224 pag->pagf_refcount_level = be32_to_cpu(agf->agf_refcount_level); in xfs_alloc_read_agf()
3225 if (xfs_agfl_needs_reset(pag->pag_mount, agf)) in xfs_alloc_read_agf()
3239 allocbt_blks -= be32_to_cpu(agf->agf_rmap_blocks) - 1; in xfs_alloc_read_agf()
3248 ASSERT(pag->pagf_freeblks == be32_to_cpu(agf->agf_freeblks)); in xfs_alloc_read_agf()
3249 ASSERT(pag->pagf_btreeblks == be32_to_cpu(agf->agf_btreeblks)); in xfs_alloc_read_agf()
3250 ASSERT(pag->pagf_flcount == be32_to_cpu(agf->agf_flcount)); in xfs_alloc_read_agf()
3251 ASSERT(pag->pagf_longest == be32_to_cpu(agf->agf_longest)); in xfs_alloc_read_agf()
3253 be32_to_cpu(agf->agf_levels[XFS_BTNUM_BNOi])); in xfs_alloc_read_agf()
3255 be32_to_cpu(agf->agf_levels[XFS_BTNUM_CNTi])); in xfs_alloc_read_agf()
3792 struct xfs_agf *agf; in __xfs_free_extent() local
3806 agf = agbp->b_addr; in __xfs_free_extent()
3814 if (XFS_IS_CORRUPT(mp, agbno + len > be32_to_cpu(agf->agf_length))) { in __xfs_free_extent()
3920 struct xfs_agf *agf, in xfs_agfl_walk() argument
3930 i = be32_to_cpu(agf->agf_flfirst); in xfs_agfl_walk()
3933 if (agf->agf_flcount == cpu_to_be32(0)) in xfs_agfl_walk()
3941 if (i == be32_to_cpu(agf->agf_fllast)) in xfs_agfl_walk()