Lines Matching refs:agf
276 xfs_agf_t *agf; /* a.g. freelist header */ in xfs_alloc_fix_minleft() local
281 agf = XFS_BUF_TO_AGF(args->agbp); in xfs_alloc_fix_minleft()
282 diff = be32_to_cpu(agf->agf_freeblks) in xfs_alloc_fix_minleft()
283 + be32_to_cpu(agf->agf_flcount) in xfs_alloc_fix_minleft()
473 struct xfs_agf *agf = XFS_BUF_TO_AGF(agbp); in xfs_alloc_update_counters() local
476 be32_add_cpu(&agf->agf_freeblks, len); in xfs_alloc_update_counters()
479 if (unlikely(be32_to_cpu(agf->agf_freeblks) > in xfs_alloc_update_counters()
480 be32_to_cpu(agf->agf_length))) in xfs_alloc_update_counters()
1699 xfs_agf_t *agf; /* a.g. freespace structure pointer */ in xfs_alloc_fix_freelist() local
1776 agf = XFS_BUF_TO_AGF(agbp); in xfs_alloc_fix_freelist()
1777 need = XFS_MIN_FREELIST(agf, mp); in xfs_alloc_fix_freelist()
1782 delta = need > be32_to_cpu(agf->agf_flcount) ? in xfs_alloc_fix_freelist()
1783 (need - be32_to_cpu(agf->agf_flcount)) : 0; in xfs_alloc_fix_freelist()
1784 longest = be32_to_cpu(agf->agf_longest); in xfs_alloc_fix_freelist()
1786 (be32_to_cpu(agf->agf_flcount) > 0 || longest > 0); in xfs_alloc_fix_freelist()
1789 ((int)(be32_to_cpu(agf->agf_freeblks) + in xfs_alloc_fix_freelist()
1790 be32_to_cpu(agf->agf_flcount) - need - args->total) < in xfs_alloc_fix_freelist()
1800 while (be32_to_cpu(agf->agf_flcount) > need) { in xfs_alloc_fix_freelist()
1828 while (be32_to_cpu(agf->agf_flcount) < need) { in xfs_alloc_fix_freelist()
1830 targs.maxlen = need - be32_to_cpu(agf->agf_flcount); in xfs_alloc_fix_freelist()
1876 xfs_agf_t *agf; /* a.g. freespace structure */ in xfs_alloc_get_freelist() local
1885 agf = XFS_BUF_TO_AGF(agbp); in xfs_alloc_get_freelist()
1889 if (!agf->agf_flcount) { in xfs_alloc_get_freelist()
1898 be32_to_cpu(agf->agf_seqno), &agflbp))) in xfs_alloc_get_freelist()
1904 bno = be32_to_cpu(agfl->agfl_bno[be32_to_cpu(agf->agf_flfirst)]); in xfs_alloc_get_freelist()
1905 be32_add_cpu(&agf->agf_flfirst, 1); in xfs_alloc_get_freelist()
1907 if (be32_to_cpu(agf->agf_flfirst) == XFS_AGFL_SIZE(mp)) in xfs_alloc_get_freelist()
1908 agf->agf_flfirst = 0; in xfs_alloc_get_freelist()
1910 pag = xfs_perag_get(mp, be32_to_cpu(agf->agf_seqno)); in xfs_alloc_get_freelist()
1911 be32_add_cpu(&agf->agf_flcount, -1); in xfs_alloc_get_freelist()
1918 be32_add_cpu(&agf->agf_btreeblks, 1); in xfs_alloc_get_freelist()
1939 if (xfs_alloc_busy_search(mp, be32_to_cpu(agf->agf_seqno), bno, 1)) in xfs_alloc_get_freelist()
2008 xfs_agf_t *agf; /* a.g. freespace structure */ in xfs_alloc_put_freelist() local
2016 agf = XFS_BUF_TO_AGF(agbp); in xfs_alloc_put_freelist()
2020 be32_to_cpu(agf->agf_seqno), &agflbp))) in xfs_alloc_put_freelist()
2023 be32_add_cpu(&agf->agf_fllast, 1); in xfs_alloc_put_freelist()
2024 if (be32_to_cpu(agf->agf_fllast) == XFS_AGFL_SIZE(mp)) in xfs_alloc_put_freelist()
2025 agf->agf_fllast = 0; in xfs_alloc_put_freelist()
2027 pag = xfs_perag_get(mp, be32_to_cpu(agf->agf_seqno)); in xfs_alloc_put_freelist()
2028 be32_add_cpu(&agf->agf_flcount, 1); in xfs_alloc_put_freelist()
2034 be32_add_cpu(&agf->agf_btreeblks, -1); in xfs_alloc_put_freelist()
2042 ASSERT(be32_to_cpu(agf->agf_flcount) <= XFS_AGFL_SIZE(mp)); in xfs_alloc_put_freelist()
2043 blockp = &agfl->agfl_bno[be32_to_cpu(agf->agf_fllast)]; in xfs_alloc_put_freelist()
2064 struct xfs_agf *agf; /* ag freelist header */ in xfs_read_agf() local
2079 agf = XFS_BUF_TO_AGF(*bpp); in xfs_read_agf()
2085 be32_to_cpu(agf->agf_magicnum) == XFS_AGF_MAGIC && in xfs_read_agf()
2086 XFS_AGF_GOOD_VERSION(be32_to_cpu(agf->agf_versionnum)) && in xfs_read_agf()
2087 be32_to_cpu(agf->agf_freeblks) <= be32_to_cpu(agf->agf_length) && in xfs_read_agf()
2088 be32_to_cpu(agf->agf_flfirst) < XFS_AGFL_SIZE(mp) && in xfs_read_agf()
2089 be32_to_cpu(agf->agf_fllast) < XFS_AGFL_SIZE(mp) && in xfs_read_agf()
2090 be32_to_cpu(agf->agf_flcount) <= XFS_AGFL_SIZE(mp) && in xfs_read_agf()
2091 be32_to_cpu(agf->agf_seqno) == agno; in xfs_read_agf()
2093 agf_ok = agf_ok && be32_to_cpu(agf->agf_btreeblks) <= in xfs_read_agf()
2094 be32_to_cpu(agf->agf_length); in xfs_read_agf()
2098 XFS_ERRLEVEL_LOW, mp, agf); in xfs_read_agf()
2117 struct xfs_agf *agf; /* ag freelist header */ in xfs_alloc_read_agf() local
2132 agf = XFS_BUF_TO_AGF(*bpp); in xfs_alloc_read_agf()
2135 pag->pagf_freeblks = be32_to_cpu(agf->agf_freeblks); in xfs_alloc_read_agf()
2136 pag->pagf_btreeblks = be32_to_cpu(agf->agf_btreeblks); in xfs_alloc_read_agf()
2137 pag->pagf_flcount = be32_to_cpu(agf->agf_flcount); in xfs_alloc_read_agf()
2138 pag->pagf_longest = be32_to_cpu(agf->agf_longest); in xfs_alloc_read_agf()
2140 be32_to_cpu(agf->agf_levels[XFS_BTNUM_BNOi]); in xfs_alloc_read_agf()
2142 be32_to_cpu(agf->agf_levels[XFS_BTNUM_CNTi]); in xfs_alloc_read_agf()
2150 ASSERT(pag->pagf_freeblks == be32_to_cpu(agf->agf_freeblks)); in xfs_alloc_read_agf()
2151 ASSERT(pag->pagf_btreeblks == be32_to_cpu(agf->agf_btreeblks)); in xfs_alloc_read_agf()
2152 ASSERT(pag->pagf_flcount == be32_to_cpu(agf->agf_flcount)); in xfs_alloc_read_agf()
2153 ASSERT(pag->pagf_longest == be32_to_cpu(agf->agf_longest)); in xfs_alloc_read_agf()
2155 be32_to_cpu(agf->agf_levels[XFS_BTNUM_BNOi])); in xfs_alloc_read_agf()
2157 be32_to_cpu(agf->agf_levels[XFS_BTNUM_CNTi])); in xfs_alloc_read_agf()