pag               549 fs/xfs/libxfs/xfs_ag.c 	struct xfs_perag	*pag;
pag               563 fs/xfs/libxfs/xfs_ag.c 	pag = xfs_perag_get(mp, agno);
pag               575 fs/xfs/libxfs/xfs_ag.c 	freeblks = pag->pagf_freeblks +
pag               576 fs/xfs/libxfs/xfs_ag.c 		   pag->pagf_flcount +
pag               577 fs/xfs/libxfs/xfs_ag.c 		   pag->pagf_btreeblks -
pag               578 fs/xfs/libxfs/xfs_ag.c 		   xfs_ag_resv_needed(pag, XFS_AG_RESV_NONE);
pag               580 fs/xfs/libxfs/xfs_ag.c 	xfs_ag_geom_health(pag, ageo);
pag               583 fs/xfs/libxfs/xfs_ag.c 	xfs_perag_put(pag);
pag                68 fs/xfs/libxfs/xfs_ag_resv.c 	struct xfs_perag		*pag,
pag                76 fs/xfs/libxfs/xfs_ag_resv.c 		avail = pag->pagf_freeblks - pag->pag_rmapbt_resv.ar_reserved;
pag                77 fs/xfs/libxfs/xfs_ag_resv.c 		orig = pag->pag_meta_resv.ar_asked;
pag                80 fs/xfs/libxfs/xfs_ag_resv.c 		avail = pag->pagf_freeblks + pag->pagf_flcount -
pag                81 fs/xfs/libxfs/xfs_ag_resv.c 			pag->pag_meta_resv.ar_reserved;
pag                82 fs/xfs/libxfs/xfs_ag_resv.c 		orig = pag->pag_rmapbt_resv.ar_asked;
pag                89 fs/xfs/libxfs/xfs_ag_resv.c 	trace_xfs_ag_resv_critical(pag, type, avail);
pag                93 fs/xfs/libxfs/xfs_ag_resv.c 			pag->pag_mount, XFS_ERRTAG_AG_RESV_CRITICAL);
pag               102 fs/xfs/libxfs/xfs_ag_resv.c 	struct xfs_perag		*pag,
pag               107 fs/xfs/libxfs/xfs_ag_resv.c 	len = pag->pag_meta_resv.ar_reserved + pag->pag_rmapbt_resv.ar_reserved;
pag               111 fs/xfs/libxfs/xfs_ag_resv.c 		len -= xfs_perag_resv(pag, type)->ar_reserved;
pag               120 fs/xfs/libxfs/xfs_ag_resv.c 	trace_xfs_ag_resv_needed(pag, type, len);
pag               128 fs/xfs/libxfs/xfs_ag_resv.c 	struct xfs_perag		*pag,
pag               135 fs/xfs/libxfs/xfs_ag_resv.c 	trace_xfs_ag_resv_free(pag, type, 0);
pag               137 fs/xfs/libxfs/xfs_ag_resv.c 	resv = xfs_perag_resv(pag, type);
pag               138 fs/xfs/libxfs/xfs_ag_resv.c 	if (pag->pag_agno == 0)
pag               139 fs/xfs/libxfs/xfs_ag_resv.c 		pag->pag_mount->m_ag_max_usable += resv->ar_asked;
pag               149 fs/xfs/libxfs/xfs_ag_resv.c 	error = xfs_mod_fdblocks(pag->pag_mount, oldresv, true);
pag               155 fs/xfs/libxfs/xfs_ag_resv.c 		trace_xfs_ag_resv_free_error(pag->pag_mount, pag->pag_agno,
pag               163 fs/xfs/libxfs/xfs_ag_resv.c 	struct xfs_perag		*pag)
pag               168 fs/xfs/libxfs/xfs_ag_resv.c 	error = __xfs_ag_resv_free(pag, XFS_AG_RESV_RMAPBT);
pag               169 fs/xfs/libxfs/xfs_ag_resv.c 	err2 = __xfs_ag_resv_free(pag, XFS_AG_RESV_METADATA);
pag               177 fs/xfs/libxfs/xfs_ag_resv.c 	struct xfs_perag		*pag,
pag               182 fs/xfs/libxfs/xfs_ag_resv.c 	struct xfs_mount		*mp = pag->pag_mount;
pag               214 fs/xfs/libxfs/xfs_ag_resv.c 		trace_xfs_ag_resv_init_error(pag->pag_mount, pag->pag_agno,
pag               218 fs/xfs/libxfs/xfs_ag_resv.c 				pag->pag_agno);
pag               228 fs/xfs/libxfs/xfs_ag_resv.c 	if (pag->pag_agno == 0)
pag               231 fs/xfs/libxfs/xfs_ag_resv.c 	resv = xfs_perag_resv(pag, type);
pag               236 fs/xfs/libxfs/xfs_ag_resv.c 	trace_xfs_ag_resv_init(pag, type, ask);
pag               243 fs/xfs/libxfs/xfs_ag_resv.c 	struct xfs_perag		*pag,
pag               246 fs/xfs/libxfs/xfs_ag_resv.c 	struct xfs_mount		*mp = pag->pag_mount;
pag               247 fs/xfs/libxfs/xfs_ag_resv.c 	xfs_agnumber_t			agno = pag->pag_agno;
pag               253 fs/xfs/libxfs/xfs_ag_resv.c 	if (pag->pag_meta_resv.ar_asked == 0) {
pag               264 fs/xfs/libxfs/xfs_ag_resv.c 		error = __xfs_ag_resv_init(pag, XFS_AG_RESV_METADATA,
pag               283 fs/xfs/libxfs/xfs_ag_resv.c 			error = __xfs_ag_resv_init(pag, XFS_AG_RESV_METADATA,
pag               291 fs/xfs/libxfs/xfs_ag_resv.c 	if (pag->pag_rmapbt_resv.ar_asked == 0) {
pag               298 fs/xfs/libxfs/xfs_ag_resv.c 		error = __xfs_ag_resv_init(pag, XFS_AG_RESV_RMAPBT, ask, used);
pag               305 fs/xfs/libxfs/xfs_ag_resv.c 	error = xfs_alloc_pagf_init(pag->pag_mount, tp, pag->pag_agno, 0);
pag               309 fs/xfs/libxfs/xfs_ag_resv.c 	ASSERT(xfs_perag_resv(pag, XFS_AG_RESV_METADATA)->ar_reserved +
pag               310 fs/xfs/libxfs/xfs_ag_resv.c 	       xfs_perag_resv(pag, XFS_AG_RESV_RMAPBT)->ar_reserved <=
pag               311 fs/xfs/libxfs/xfs_ag_resv.c 	       pag->pagf_freeblks + pag->pagf_flcount);
pag               320 fs/xfs/libxfs/xfs_ag_resv.c 	struct xfs_perag		*pag,
pag               328 fs/xfs/libxfs/xfs_ag_resv.c 	trace_xfs_ag_resv_alloc_extent(pag, type, args->len);
pag               335 fs/xfs/libxfs/xfs_ag_resv.c 		resv = xfs_perag_resv(pag, type);
pag               362 fs/xfs/libxfs/xfs_ag_resv.c 	struct xfs_perag		*pag,
pag               370 fs/xfs/libxfs/xfs_ag_resv.c 	trace_xfs_ag_resv_free_extent(pag, type, len);
pag               377 fs/xfs/libxfs/xfs_ag_resv.c 		resv = xfs_perag_resv(pag, type);
pag                 9 fs/xfs/libxfs/xfs_ag_resv.h int xfs_ag_resv_free(struct xfs_perag *pag);
pag                10 fs/xfs/libxfs/xfs_ag_resv.h int xfs_ag_resv_init(struct xfs_perag *pag, struct xfs_trans *tp);
pag                12 fs/xfs/libxfs/xfs_ag_resv.h bool xfs_ag_resv_critical(struct xfs_perag *pag, enum xfs_ag_resv_type type);
pag                13 fs/xfs/libxfs/xfs_ag_resv.h xfs_extlen_t xfs_ag_resv_needed(struct xfs_perag *pag,
pag                16 fs/xfs/libxfs/xfs_ag_resv.h void xfs_ag_resv_alloc_extent(struct xfs_perag *pag, enum xfs_ag_resv_type type,
pag                18 fs/xfs/libxfs/xfs_ag_resv.h void xfs_ag_resv_free_extent(struct xfs_perag *pag, enum xfs_ag_resv_type type,
pag                32 fs/xfs/libxfs/xfs_ag_resv.h 	struct xfs_perag	*pag;
pag                35 fs/xfs/libxfs/xfs_ag_resv.h 	pag = xfs_perag_get(mp, agno);
pag                36 fs/xfs/libxfs/xfs_ag_resv.h 	xfs_ag_resv_alloc_extent(pag, XFS_AG_RESV_RMAPBT, &args);
pag                37 fs/xfs/libxfs/xfs_ag_resv.h 	xfs_perag_put(pag);
pag                45 fs/xfs/libxfs/xfs_ag_resv.h 	struct xfs_perag	*pag;
pag                47 fs/xfs/libxfs/xfs_ag_resv.h 	pag = xfs_perag_get(mp, agno);
pag                48 fs/xfs/libxfs/xfs_ag_resv.h 	xfs_ag_resv_free_extent(pag, XFS_AG_RESV_RMAPBT, NULL, 1);
pag                49 fs/xfs/libxfs/xfs_ag_resv.h 	xfs_perag_put(pag);
pag               397 fs/xfs/libxfs/xfs_alloc.c 	ASSERT(args->pag->pagf_freeblks + args->pag->pagf_flcount >=
pag               676 fs/xfs/libxfs/xfs_alloc.c 	struct xfs_perag	*pag,
pag               682 fs/xfs/libxfs/xfs_alloc.c 	pag->pagf_freeblks += len;
pag               855 fs/xfs/libxfs/xfs_alloc.c 		error = xfs_alloc_update_counters(args->tp, args->pag,
pag               865 fs/xfs/libxfs/xfs_alloc.c 	xfs_ag_resv_alloc_extent(args->pag, args->resv, args);
pag              1420 fs/xfs/libxfs/xfs_alloc.c 			xfs_extent_busy_flush(args->mp, args->pag, busy_gen);
pag              1569 fs/xfs/libxfs/xfs_alloc.c 							args->pag, busy_gen);
pag              1638 fs/xfs/libxfs/xfs_alloc.c 			xfs_extent_busy_flush(args->mp, args->pag, busy_gen);
pag              1696 fs/xfs/libxfs/xfs_alloc.c 	struct xfs_perag		*pag;
pag              1919 fs/xfs/libxfs/xfs_alloc.c 	pag = xfs_perag_get(mp, agno);
pag              1920 fs/xfs/libxfs/xfs_alloc.c 	error = xfs_alloc_update_counters(tp, pag, agbp, len);
pag              1921 fs/xfs/libxfs/xfs_alloc.c 	xfs_ag_resv_free_extent(pag, type, tp, len);
pag              1922 fs/xfs/libxfs/xfs_alloc.c 	xfs_perag_put(pag);
pag              1966 fs/xfs/libxfs/xfs_alloc.c 	struct xfs_perag	*pag,
pag              1976 fs/xfs/libxfs/xfs_alloc.c 	if (need > pag->pagf_flcount)
pag              1977 fs/xfs/libxfs/xfs_alloc.c 		delta = need - pag->pagf_flcount;
pag              1984 fs/xfs/libxfs/xfs_alloc.c 	if (pag->pagf_freeblks - pag->pagf_longest < reserved)
pag              1985 fs/xfs/libxfs/xfs_alloc.c 		delta += reserved - (pag->pagf_freeblks - pag->pagf_longest);
pag              1991 fs/xfs/libxfs/xfs_alloc.c 	if (pag->pagf_longest > delta)
pag              1992 fs/xfs/libxfs/xfs_alloc.c 		return pag->pagf_longest - delta;
pag              1995 fs/xfs/libxfs/xfs_alloc.c 	return pag->pagf_flcount > 0 || pag->pagf_longest > 0;
pag              2001 fs/xfs/libxfs/xfs_alloc.c 	struct xfs_perag	*pag)
pag              2006 fs/xfs/libxfs/xfs_alloc.c 	min_free = min_t(unsigned int, pag->pagf_levels[XFS_BTNUM_BNOi] + 1,
pag              2009 fs/xfs/libxfs/xfs_alloc.c 	min_free += min_t(unsigned int, pag->pagf_levels[XFS_BTNUM_CNTi] + 1,
pag              2014 fs/xfs/libxfs/xfs_alloc.c 				  pag->pagf_levels[XFS_BTNUM_RMAPi] + 1,
pag              2032 fs/xfs/libxfs/xfs_alloc.c 	struct xfs_perag	*pag = args->pag;
pag              2041 fs/xfs/libxfs/xfs_alloc.c 	reservation = xfs_ag_resv_needed(pag, args->resv);
pag              2045 fs/xfs/libxfs/xfs_alloc.c 	longest = xfs_alloc_longest_free_extent(pag, min_free, reservation);
pag              2054 fs/xfs/libxfs/xfs_alloc.c 	agflcount = min_t(xfs_extlen_t, pag->pagf_flcount, min_free);
pag              2055 fs/xfs/libxfs/xfs_alloc.c 	available = (int)(pag->pagf_freeblks + agflcount -
pag              2161 fs/xfs/libxfs/xfs_alloc.c 	struct xfs_perag	*pag)
pag              2166 fs/xfs/libxfs/xfs_alloc.c 	ASSERT(pag->pagf_agflreset);
pag              2172 fs/xfs/libxfs/xfs_alloc.c 	         pag->pag_agno, pag->pagf_flcount);
pag              2180 fs/xfs/libxfs/xfs_alloc.c 	pag->pagf_flcount = 0;
pag              2181 fs/xfs/libxfs/xfs_alloc.c 	pag->pagf_agflreset = false;
pag              2228 fs/xfs/libxfs/xfs_alloc.c 	struct xfs_perag	*pag = args->pag;
pag              2240 fs/xfs/libxfs/xfs_alloc.c 	if (!pag->pagf_init) {
pag              2244 fs/xfs/libxfs/xfs_alloc.c 		if (!pag->pagf_init) {
pag              2256 fs/xfs/libxfs/xfs_alloc.c 	if (pag->pagf_metadata && xfs_alloc_is_userdata(args->datatype) &&
pag              2262 fs/xfs/libxfs/xfs_alloc.c 	need = xfs_alloc_min_freelist(mp, pag);
pag              2283 fs/xfs/libxfs/xfs_alloc.c 	if (pag->pagf_agflreset)
pag              2284 fs/xfs/libxfs/xfs_alloc.c 		xfs_agfl_reset(tp, agbp, pag);
pag              2287 fs/xfs/libxfs/xfs_alloc.c 	need = xfs_alloc_min_freelist(mp, pag);
pag              2321 fs/xfs/libxfs/xfs_alloc.c 	while (!(flags & XFS_ALLOC_FLAG_NOSHRINK) && pag->pagf_flcount > need) {
pag              2336 fs/xfs/libxfs/xfs_alloc.c 	targs.pag = pag;
pag              2342 fs/xfs/libxfs/xfs_alloc.c 	while (pag->pagf_flcount < need) {
pag              2344 fs/xfs/libxfs/xfs_alloc.c 		targs.maxlen = need - pag->pagf_flcount;
pag              2404 fs/xfs/libxfs/xfs_alloc.c 	xfs_perag_t	*pag;	/* per allocation group data */
pag              2433 fs/xfs/libxfs/xfs_alloc.c 	pag = xfs_perag_get(mp, be32_to_cpu(agf->agf_seqno));
pag              2434 fs/xfs/libxfs/xfs_alloc.c 	ASSERT(!pag->pagf_agflreset);
pag              2437 fs/xfs/libxfs/xfs_alloc.c 	pag->pagf_flcount--;
pag              2442 fs/xfs/libxfs/xfs_alloc.c 		pag->pagf_btreeblks++;
pag              2445 fs/xfs/libxfs/xfs_alloc.c 	xfs_perag_put(pag);
pag              2531 fs/xfs/libxfs/xfs_alloc.c 	xfs_perag_t		*pag;	/* per allocation group data */
pag              2545 fs/xfs/libxfs/xfs_alloc.c 	pag = xfs_perag_get(mp, be32_to_cpu(agf->agf_seqno));
pag              2546 fs/xfs/libxfs/xfs_alloc.c 	ASSERT(!pag->pagf_agflreset);
pag              2549 fs/xfs/libxfs/xfs_alloc.c 	pag->pagf_flcount++;
pag              2554 fs/xfs/libxfs/xfs_alloc.c 		pag->pagf_btreeblks--;
pag              2557 fs/xfs/libxfs/xfs_alloc.c 	xfs_perag_put(pag);
pag              2724 fs/xfs/libxfs/xfs_alloc.c 	struct xfs_perag	*pag;		/* per allocation group data */
pag              2740 fs/xfs/libxfs/xfs_alloc.c 	pag = xfs_perag_get(mp, agno);
pag              2741 fs/xfs/libxfs/xfs_alloc.c 	if (!pag->pagf_init) {
pag              2742 fs/xfs/libxfs/xfs_alloc.c 		pag->pagf_freeblks = be32_to_cpu(agf->agf_freeblks);
pag              2743 fs/xfs/libxfs/xfs_alloc.c 		pag->pagf_btreeblks = be32_to_cpu(agf->agf_btreeblks);
pag              2744 fs/xfs/libxfs/xfs_alloc.c 		pag->pagf_flcount = be32_to_cpu(agf->agf_flcount);
pag              2745 fs/xfs/libxfs/xfs_alloc.c 		pag->pagf_longest = be32_to_cpu(agf->agf_longest);
pag              2746 fs/xfs/libxfs/xfs_alloc.c 		pag->pagf_levels[XFS_BTNUM_BNOi] =
pag              2748 fs/xfs/libxfs/xfs_alloc.c 		pag->pagf_levels[XFS_BTNUM_CNTi] =
pag              2750 fs/xfs/libxfs/xfs_alloc.c 		pag->pagf_levels[XFS_BTNUM_RMAPi] =
pag              2752 fs/xfs/libxfs/xfs_alloc.c 		pag->pagf_refcount_level = be32_to_cpu(agf->agf_refcount_level);
pag              2753 fs/xfs/libxfs/xfs_alloc.c 		pag->pagf_init = 1;
pag              2754 fs/xfs/libxfs/xfs_alloc.c 		pag->pagf_agflreset = xfs_agfl_needs_reset(mp, agf);
pag              2758 fs/xfs/libxfs/xfs_alloc.c 		ASSERT(pag->pagf_freeblks == be32_to_cpu(agf->agf_freeblks));
pag              2759 fs/xfs/libxfs/xfs_alloc.c 		ASSERT(pag->pagf_btreeblks == be32_to_cpu(agf->agf_btreeblks));
pag              2760 fs/xfs/libxfs/xfs_alloc.c 		ASSERT(pag->pagf_flcount == be32_to_cpu(agf->agf_flcount));
pag              2761 fs/xfs/libxfs/xfs_alloc.c 		ASSERT(pag->pagf_longest == be32_to_cpu(agf->agf_longest));
pag              2762 fs/xfs/libxfs/xfs_alloc.c 		ASSERT(pag->pagf_levels[XFS_BTNUM_BNOi] ==
pag              2764 fs/xfs/libxfs/xfs_alloc.c 		ASSERT(pag->pagf_levels[XFS_BTNUM_CNTi] ==
pag              2768 fs/xfs/libxfs/xfs_alloc.c 	xfs_perag_put(pag);
pag              2825 fs/xfs/libxfs/xfs_alloc.c 		args->pag = xfs_perag_get(mp, args->agno);
pag              2878 fs/xfs/libxfs/xfs_alloc.c 			args->pag = xfs_perag_get(mp, args->agno);
pag              2932 fs/xfs/libxfs/xfs_alloc.c 			xfs_perag_put(args->pag);
pag              2967 fs/xfs/libxfs/xfs_alloc.c 	xfs_perag_put(args->pag);
pag              2970 fs/xfs/libxfs/xfs_alloc.c 	xfs_perag_put(args->pag);
pag              2996 fs/xfs/libxfs/xfs_alloc.c 	args.pag = xfs_perag_get(args.mp, args.agno);
pag              2997 fs/xfs/libxfs/xfs_alloc.c 	ASSERT(args.pag);
pag              3005 fs/xfs/libxfs/xfs_alloc.c 	xfs_perag_put(args.pag);
pag                56 fs/xfs/libxfs/xfs_alloc.h 	struct xfs_perag *pag;		/* per-ag struct for this agno */
pag               106 fs/xfs/libxfs/xfs_alloc.h xfs_extlen_t xfs_alloc_longest_free_extent(struct xfs_perag *pag,
pag               109 fs/xfs/libxfs/xfs_alloc.h 		struct xfs_perag *pag);
pag                42 fs/xfs/libxfs/xfs_alloc_btree.c 	struct xfs_perag	*pag = xfs_perag_get(cur->bc_mp, seqno);
pag                48 fs/xfs/libxfs/xfs_alloc_btree.c 	pag->pagf_levels[btnum] += inc;
pag                49 fs/xfs/libxfs/xfs_alloc_btree.c 	xfs_perag_put(pag);
pag               118 fs/xfs/libxfs/xfs_alloc_btree.c 	struct xfs_perag	*pag;
pag               162 fs/xfs/libxfs/xfs_alloc_btree.c 	pag = xfs_perag_get(cur->bc_mp, seqno);
pag               163 fs/xfs/libxfs/xfs_alloc_btree.c 	pag->pagf_longest = be32_to_cpu(len);
pag               164 fs/xfs/libxfs/xfs_alloc_btree.c 	xfs_perag_put(pag);
pag               296 fs/xfs/libxfs/xfs_alloc_btree.c 	struct xfs_perag	*pag = bp->b_pag;
pag               322 fs/xfs/libxfs/xfs_alloc_btree.c 	if (pag && pag->pagf_init) {
pag               323 fs/xfs/libxfs/xfs_alloc_btree.c 		if (level >= pag->pagf_levels[btnum])
pag              3199 fs/xfs/libxfs/xfs_bmap.c 	struct xfs_perag	*pag;
pag              3203 fs/xfs/libxfs/xfs_bmap.c 	pag = xfs_perag_get(mp, ag);
pag              3204 fs/xfs/libxfs/xfs_bmap.c 	if (!pag->pagf_init) {
pag              3209 fs/xfs/libxfs/xfs_bmap.c 		if (!pag->pagf_init) {
pag              3215 fs/xfs/libxfs/xfs_bmap.c 	longest = xfs_alloc_longest_free_extent(pag,
pag              3216 fs/xfs/libxfs/xfs_bmap.c 				xfs_alloc_min_freelist(mp, pag),
pag              3217 fs/xfs/libxfs/xfs_bmap.c 				xfs_ag_resv_needed(pag, XFS_AG_RESV_NONE));
pag              3222 fs/xfs/libxfs/xfs_bmap.c 	xfs_perag_put(pag);
pag              4476 fs/xfs/libxfs/xfs_btree.c 	struct xfs_perag	*pag = bp->b_pag;
pag              4484 fs/xfs/libxfs/xfs_btree.c 	if (pag && be32_to_cpu(block->bb_u.s.bb_owner) != pag->pag_agno)
pag               112 fs/xfs/libxfs/xfs_health.h void xfs_ag_mark_sick(struct xfs_perag *pag, unsigned int mask);
pag               113 fs/xfs/libxfs/xfs_health.h void xfs_ag_mark_healthy(struct xfs_perag *pag, unsigned int mask);
pag               114 fs/xfs/libxfs/xfs_health.h void xfs_ag_measure_sickness(struct xfs_perag *pag, unsigned int *sick,
pag               145 fs/xfs/libxfs/xfs_health.h xfs_ag_has_sickness(struct xfs_perag *pag, unsigned int mask)
pag               149 fs/xfs/libxfs/xfs_health.h 	xfs_ag_measure_sickness(pag, &sick, &checked);
pag               175 fs/xfs/libxfs/xfs_health.h xfs_ag_is_healthy(struct xfs_perag *pag)
pag               177 fs/xfs/libxfs/xfs_health.h 	return !xfs_ag_has_sickness(pag, -1U);
pag               187 fs/xfs/libxfs/xfs_health.h void xfs_ag_geom_health(struct xfs_perag *pag, struct xfs_ag_geometry *ageo);
pag               620 fs/xfs/libxfs/xfs_ialloc.c 	struct xfs_perag	*pag;
pag               882 fs/xfs/libxfs/xfs_ialloc.c 	pag = xfs_perag_get(args.mp, agno);
pag               883 fs/xfs/libxfs/xfs_ialloc.c 	pag->pagi_freecount += newlen;
pag               884 fs/xfs/libxfs/xfs_ialloc.c 	pag->pagi_count += newlen;
pag               885 fs/xfs/libxfs/xfs_ialloc.c 	xfs_perag_put(pag);
pag               934 fs/xfs/libxfs/xfs_ialloc.c 	xfs_perag_t	*pag;		/* per allocation group data */
pag               965 fs/xfs/libxfs/xfs_ialloc.c 		pag = xfs_perag_get(mp, agno);
pag               966 fs/xfs/libxfs/xfs_ialloc.c 		if (!pag->pagi_inodeok) {
pag               971 fs/xfs/libxfs/xfs_ialloc.c 		if (!pag->pagi_init) {
pag               977 fs/xfs/libxfs/xfs_ialloc.c 		if (pag->pagi_freecount) {
pag               978 fs/xfs/libxfs/xfs_ialloc.c 			xfs_perag_put(pag);
pag               982 fs/xfs/libxfs/xfs_ialloc.c 		if (!pag->pagf_init) {
pag              1007 fs/xfs/libxfs/xfs_ialloc.c 		longest = pag->pagf_longest;
pag              1009 fs/xfs/libxfs/xfs_ialloc.c 			longest = pag->pagf_flcount > 0;
pag              1011 fs/xfs/libxfs/xfs_ialloc.c 		if (pag->pagf_freeblks >= needspace + ineed &&
pag              1013 fs/xfs/libxfs/xfs_ialloc.c 			xfs_perag_put(pag);
pag              1017 fs/xfs/libxfs/xfs_ialloc.c 		xfs_perag_put(pag);
pag              1126 fs/xfs/libxfs/xfs_ialloc.c 	struct xfs_perag	*pag;
pag              1135 fs/xfs/libxfs/xfs_ialloc.c 	pag = xfs_perag_get(mp, agno);
pag              1137 fs/xfs/libxfs/xfs_ialloc.c 	ASSERT(pag->pagi_init);
pag              1138 fs/xfs/libxfs/xfs_ialloc.c 	ASSERT(pag->pagi_inodeok);
pag              1139 fs/xfs/libxfs/xfs_ialloc.c 	ASSERT(pag->pagi_freecount > 0);
pag              1193 fs/xfs/libxfs/xfs_ialloc.c 		    pag->pagl_pagino == pagino &&
pag              1194 fs/xfs/libxfs/xfs_ialloc.c 		    pag->pagl_leftrec != NULLAGINO &&
pag              1195 fs/xfs/libxfs/xfs_ialloc.c 		    pag->pagl_rightrec != NULLAGINO) {
pag              1196 fs/xfs/libxfs/xfs_ialloc.c 			error = xfs_ialloc_get_rec(tcur, pag->pagl_leftrec,
pag              1201 fs/xfs/libxfs/xfs_ialloc.c 			error = xfs_ialloc_get_rec(cur, pag->pagl_rightrec,
pag              1237 fs/xfs/libxfs/xfs_ialloc.c 				pag->pagl_leftrec = trec.ir_startino;
pag              1238 fs/xfs/libxfs/xfs_ialloc.c 				pag->pagl_rightrec = rec.ir_startino;
pag              1239 fs/xfs/libxfs/xfs_ialloc.c 				pag->pagl_pagino = pagino;
pag              1248 fs/xfs/libxfs/xfs_ialloc.c 				pag->pagl_leftrec = trec.ir_startino;
pag              1249 fs/xfs/libxfs/xfs_ialloc.c 				pag->pagl_rightrec = rec.ir_startino;
pag              1250 fs/xfs/libxfs/xfs_ialloc.c 				pag->pagl_pagino = pagino;
pag              1272 fs/xfs/libxfs/xfs_ialloc.c 			pag->pagl_leftrec = trec.ir_startino;
pag              1273 fs/xfs/libxfs/xfs_ialloc.c 			pag->pagl_rightrec = rec.ir_startino;
pag              1274 fs/xfs/libxfs/xfs_ialloc.c 			pag->pagl_pagino = pagino;
pag              1284 fs/xfs/libxfs/xfs_ialloc.c 			pag->pagl_pagino = NULLAGINO;
pag              1285 fs/xfs/libxfs/xfs_ialloc.c 			pag->pagl_leftrec = NULLAGINO;
pag              1286 fs/xfs/libxfs/xfs_ialloc.c 			pag->pagl_rightrec = NULLAGINO;
pag              1353 fs/xfs/libxfs/xfs_ialloc.c 	pag->pagi_freecount--;
pag              1361 fs/xfs/libxfs/xfs_ialloc.c 	xfs_perag_put(pag);
pag              1368 fs/xfs/libxfs/xfs_ialloc.c 	xfs_perag_put(pag);
pag              1550 fs/xfs/libxfs/xfs_ialloc.c 	struct xfs_perag		*pag;
pag              1562 fs/xfs/libxfs/xfs_ialloc.c 	pag = xfs_perag_get(mp, agno);
pag              1630 fs/xfs/libxfs/xfs_ialloc.c 	pag->pagi_freecount--;
pag              1643 fs/xfs/libxfs/xfs_ialloc.c 	xfs_perag_put(pag);
pag              1651 fs/xfs/libxfs/xfs_ialloc.c 	xfs_perag_put(pag);
pag              1691 fs/xfs/libxfs/xfs_ialloc.c 	struct xfs_perag	*pag;
pag              1737 fs/xfs/libxfs/xfs_ialloc.c 		pag = xfs_perag_get(mp, agno);
pag              1738 fs/xfs/libxfs/xfs_ialloc.c 		if (!pag->pagi_inodeok) {
pag              1743 fs/xfs/libxfs/xfs_ialloc.c 		if (!pag->pagi_init) {
pag              1752 fs/xfs/libxfs/xfs_ialloc.c 		if (!pag->pagi_freecount && !okalloc)
pag              1763 fs/xfs/libxfs/xfs_ialloc.c 		if (pag->pagi_freecount) {
pag              1764 fs/xfs/libxfs/xfs_ialloc.c 			xfs_perag_put(pag);
pag              1779 fs/xfs/libxfs/xfs_ialloc.c 			xfs_perag_put(pag);
pag              1791 fs/xfs/libxfs/xfs_ialloc.c 			ASSERT(pag->pagi_freecount > 0);
pag              1792 fs/xfs/libxfs/xfs_ialloc.c 			xfs_perag_put(pag);
pag              1802 fs/xfs/libxfs/xfs_ialloc.c 		xfs_perag_put(pag);
pag              1815 fs/xfs/libxfs/xfs_ialloc.c 	xfs_perag_put(pag);
pag              1908 fs/xfs/libxfs/xfs_ialloc.c 	struct xfs_perag		*pag;
pag              1977 fs/xfs/libxfs/xfs_ialloc.c 		pag = xfs_perag_get(mp, agno);
pag              1978 fs/xfs/libxfs/xfs_ialloc.c 		pag->pagi_freecount -= ilen - 1;
pag              1979 fs/xfs/libxfs/xfs_ialloc.c 		pag->pagi_count -= ilen;
pag              1980 fs/xfs/libxfs/xfs_ialloc.c 		xfs_perag_put(pag);
pag              2006 fs/xfs/libxfs/xfs_ialloc.c 		pag = xfs_perag_get(mp, agno);
pag              2007 fs/xfs/libxfs/xfs_ialloc.c 		pag->pagi_freecount++;
pag              2008 fs/xfs/libxfs/xfs_ialloc.c 		xfs_perag_put(pag);
pag              2600 fs/xfs/libxfs/xfs_ialloc.c 	struct xfs_perag	*pag;	/* per allocation group data */
pag              2610 fs/xfs/libxfs/xfs_ialloc.c 	pag = xfs_perag_get(mp, agno);
pag              2611 fs/xfs/libxfs/xfs_ialloc.c 	if (!pag->pagi_init) {
pag              2612 fs/xfs/libxfs/xfs_ialloc.c 		pag->pagi_freecount = be32_to_cpu(agi->agi_freecount);
pag              2613 fs/xfs/libxfs/xfs_ialloc.c 		pag->pagi_count = be32_to_cpu(agi->agi_count);
pag              2614 fs/xfs/libxfs/xfs_ialloc.c 		pag->pagi_init = 1;
pag              2621 fs/xfs/libxfs/xfs_ialloc.c 	ASSERT(pag->pagi_freecount == be32_to_cpu(agi->agi_freecount) ||
pag              2623 fs/xfs/libxfs/xfs_ialloc.c 	xfs_perag_put(pag);
pag                40 fs/xfs/libxfs/xfs_refcount_btree.c 	struct xfs_perag	*pag = xfs_perag_get(cur->bc_mp, seqno);
pag                46 fs/xfs/libxfs/xfs_refcount_btree.c 	pag->pagf_refcount_level += inc;
pag                47 fs/xfs/libxfs/xfs_refcount_btree.c 	xfs_perag_put(pag);
pag               206 fs/xfs/libxfs/xfs_refcount_btree.c 	struct xfs_perag	*pag = bp->b_pag;
pag               220 fs/xfs/libxfs/xfs_refcount_btree.c 	if (pag && pag->pagf_init) {
pag               221 fs/xfs/libxfs/xfs_refcount_btree.c 		if (level >= pag->pagf_refcount_level)
pag                67 fs/xfs/libxfs/xfs_rmap_btree.c 	struct xfs_perag	*pag = xfs_perag_get(cur->bc_mp, seqno);
pag                73 fs/xfs/libxfs/xfs_rmap_btree.c 	pag->pagf_levels[btnum] += inc;
pag                74 fs/xfs/libxfs/xfs_rmap_btree.c 	xfs_perag_put(pag);
pag               293 fs/xfs/libxfs/xfs_rmap_btree.c 	struct xfs_perag	*pag = bp->b_pag;
pag               319 fs/xfs/libxfs/xfs_rmap_btree.c 	if (pag && pag->pagf_init) {
pag               320 fs/xfs/libxfs/xfs_rmap_btree.c 		if (level >= pag->pagf_levels[XFS_BTNUM_RMAPi])
pag                42 fs/xfs/libxfs/xfs_sb.c 	struct xfs_perag	*pag;
pag                46 fs/xfs/libxfs/xfs_sb.c 	pag = radix_tree_lookup(&mp->m_perag_tree, agno);
pag                47 fs/xfs/libxfs/xfs_sb.c 	if (pag) {
pag                48 fs/xfs/libxfs/xfs_sb.c 		ASSERT(atomic_read(&pag->pag_ref) >= 0);
pag                49 fs/xfs/libxfs/xfs_sb.c 		ref = atomic_inc_return(&pag->pag_ref);
pag                53 fs/xfs/libxfs/xfs_sb.c 	return pag;
pag                65 fs/xfs/libxfs/xfs_sb.c 	struct xfs_perag	*pag;
pag                71 fs/xfs/libxfs/xfs_sb.c 					(void **)&pag, first, 1, tag);
pag                76 fs/xfs/libxfs/xfs_sb.c 	ref = atomic_inc_return(&pag->pag_ref);
pag                78 fs/xfs/libxfs/xfs_sb.c 	trace_xfs_perag_get_tag(mp, pag->pag_agno, ref, _RET_IP_);
pag                79 fs/xfs/libxfs/xfs_sb.c 	return pag;
pag                84 fs/xfs/libxfs/xfs_sb.c 	struct xfs_perag	*pag)
pag                88 fs/xfs/libxfs/xfs_sb.c 	ASSERT(atomic_read(&pag->pag_ref) > 0);
pag                89 fs/xfs/libxfs/xfs_sb.c 	ref = atomic_dec_return(&pag->pag_ref);
pag                90 fs/xfs/libxfs/xfs_sb.c 	trace_xfs_perag_put(pag->pag_mount, pag->pag_agno, ref, _RET_IP_);
pag               854 fs/xfs/libxfs/xfs_sb.c 	xfs_perag_t	*pag;
pag               877 fs/xfs/libxfs/xfs_sb.c 		pag = xfs_perag_get(mp, index);
pag               878 fs/xfs/libxfs/xfs_sb.c 		ifree += pag->pagi_freecount;
pag               879 fs/xfs/libxfs/xfs_sb.c 		ialloc += pag->pagi_count;
pag               880 fs/xfs/libxfs/xfs_sb.c 		bfree += pag->pagf_freeblks;
pag               881 fs/xfs/libxfs/xfs_sb.c 		bfreelst += pag->pagf_flcount;
pag               882 fs/xfs/libxfs/xfs_sb.c 		btree += pag->pagf_btreeblks;
pag               883 fs/xfs/libxfs/xfs_sb.c 		xfs_perag_put(pag);
pag                22 fs/xfs/libxfs/xfs_sb.h extern void	xfs_perag_put(struct xfs_perag *pag);
pag               510 fs/xfs/scrub/agheader.c 	struct xfs_perag	*pag;
pag               584 fs/xfs/scrub/agheader.c 	pag = xfs_perag_get(mp, agno);
pag               585 fs/xfs/scrub/agheader.c 	if (pag->pagf_freeblks != be32_to_cpu(agf->agf_freeblks))
pag               587 fs/xfs/scrub/agheader.c 	if (pag->pagf_flcount != be32_to_cpu(agf->agf_flcount))
pag               589 fs/xfs/scrub/agheader.c 	if (pag->pagf_btreeblks != be32_to_cpu(agf->agf_btreeblks))
pag               591 fs/xfs/scrub/agheader.c 	xfs_perag_put(pag);
pag               818 fs/xfs/scrub/agheader.c 	struct xfs_perag	*pag;
pag               890 fs/xfs/scrub/agheader.c 	pag = xfs_perag_get(mp, agno);
pag               891 fs/xfs/scrub/agheader.c 	if (pag->pagi_count != be32_to_cpu(agi->agi_count))
pag               893 fs/xfs/scrub/agheader.c 	if (pag->pagi_freecount != be32_to_cpu(agi->agi_freecount))
pag               895 fs/xfs/scrub/agheader.c 	xfs_perag_put(pag);
pag               199 fs/xfs/scrub/agheader_repair.c 	ASSERT(sc->sa.pag->pagf_init);
pag               200 fs/xfs/scrub/agheader_repair.c 	sc->sa.pag->pagf_init = 0;
pag               304 fs/xfs/scrub/agheader_repair.c 	struct xfs_perag	*pag;
pag               315 fs/xfs/scrub/agheader_repair.c 	pag = sc->sa.pag;
pag               316 fs/xfs/scrub/agheader_repair.c 	pag->pagf_btreeblks = be32_to_cpu(agf->agf_btreeblks);
pag               317 fs/xfs/scrub/agheader_repair.c 	pag->pagf_freeblks = be32_to_cpu(agf->agf_freeblks);
pag               318 fs/xfs/scrub/agheader_repair.c 	pag->pagf_longest = be32_to_cpu(agf->agf_longest);
pag               319 fs/xfs/scrub/agheader_repair.c 	pag->pagf_levels[XFS_BTNUM_BNOi] =
pag               321 fs/xfs/scrub/agheader_repair.c 	pag->pagf_levels[XFS_BTNUM_CNTi] =
pag               323 fs/xfs/scrub/agheader_repair.c 	pag->pagf_levels[XFS_BTNUM_RMAPi] =
pag               325 fs/xfs/scrub/agheader_repair.c 	pag->pagf_refcount_level = be32_to_cpu(agf->agf_refcount_level);
pag               326 fs/xfs/scrub/agheader_repair.c 	pag->pagf_init = 1;
pag               423 fs/xfs/scrub/agheader_repair.c 	sc->sa.pag->pagf_init = 0;
pag               561 fs/xfs/scrub/agheader_repair.c 	if (sc->sa.pag->pagf_init)
pag               562 fs/xfs/scrub/agheader_repair.c 		sc->sa.pag->pagf_flcount = flcount;
pag               787 fs/xfs/scrub/agheader_repair.c 	ASSERT(sc->sa.pag->pagi_init);
pag               788 fs/xfs/scrub/agheader_repair.c 	sc->sa.pag->pagi_init = 0;
pag               841 fs/xfs/scrub/agheader_repair.c 	struct xfs_perag	*pag;
pag               852 fs/xfs/scrub/agheader_repair.c 	pag = sc->sa.pag;
pag               853 fs/xfs/scrub/agheader_repair.c 	pag->pagi_count = be32_to_cpu(agi->agi_count);
pag               854 fs/xfs/scrub/agheader_repair.c 	pag->pagi_freecount = be32_to_cpu(agi->agi_freecount);
pag               855 fs/xfs/scrub/agheader_repair.c 	pag->pagi_init = 1;
pag               918 fs/xfs/scrub/agheader_repair.c 	sc->sa.pag->pagi_init = 0;
pag               465 fs/xfs/scrub/common.c 	    xchk_ag_btree_healthy_enough(sc, sa->pag, XFS_BTNUM_BNO)) {
pag               474 fs/xfs/scrub/common.c 	    xchk_ag_btree_healthy_enough(sc, sa->pag, XFS_BTNUM_CNT)) {
pag               484 fs/xfs/scrub/common.c 	    xchk_ag_btree_healthy_enough(sc, sa->pag, XFS_BTNUM_INO)) {
pag               493 fs/xfs/scrub/common.c 	    xchk_ag_btree_healthy_enough(sc, sa->pag, XFS_BTNUM_FINO)) {
pag               502 fs/xfs/scrub/common.c 	    xchk_ag_btree_healthy_enough(sc, sa->pag, XFS_BTNUM_RMAP)) {
pag               511 fs/xfs/scrub/common.c 	    xchk_ag_btree_healthy_enough(sc, sa->pag, XFS_BTNUM_REFC)) {
pag               542 fs/xfs/scrub/common.c 	if (sa->pag) {
pag               543 fs/xfs/scrub/common.c 		xfs_perag_put(sa->pag);
pag               544 fs/xfs/scrub/common.c 		sa->pag = NULL;
pag               582 fs/xfs/scrub/common.c 	if (!sa->pag)
pag               583 fs/xfs/scrub/common.c 		sa->pag = xfs_perag_get(mp, sa->agno);
pag                69 fs/xfs/scrub/fscounters.c 	struct xfs_perag	*pag = NULL;
pag                74 fs/xfs/scrub/fscounters.c 		pag = xfs_perag_get(mp, agno);
pag                76 fs/xfs/scrub/fscounters.c 		if (pag->pagi_init && pag->pagf_init)
pag                95 fs/xfs/scrub/fscounters.c 		if (!pag->pagi_init || !pag->pagf_init)
pag               103 fs/xfs/scrub/fscounters.c 		xfs_perag_put(pag);
pag               104 fs/xfs/scrub/fscounters.c 		pag = NULL;
pag               115 fs/xfs/scrub/fscounters.c 	if (pag)
pag               116 fs/xfs/scrub/fscounters.c 		xfs_perag_put(pag);
pag               162 fs/xfs/scrub/fscounters.c 	struct xfs_perag	*pag;
pag               173 fs/xfs/scrub/fscounters.c 		pag = xfs_perag_get(mp, agno);
pag               176 fs/xfs/scrub/fscounters.c 		if (!pag->pagi_init || !pag->pagf_init) {
pag               177 fs/xfs/scrub/fscounters.c 			xfs_perag_put(pag);
pag               182 fs/xfs/scrub/fscounters.c 		fsc->icount += pag->pagi_count;
pag               183 fs/xfs/scrub/fscounters.c 		fsc->ifree += pag->pagi_freecount;
pag               186 fs/xfs/scrub/fscounters.c 		fsc->fdblocks += pag->pagf_freeblks;
pag               187 fs/xfs/scrub/fscounters.c 		fsc->fdblocks += pag->pagf_flcount;
pag               188 fs/xfs/scrub/fscounters.c 		fsc->fdblocks += pag->pagf_btreeblks;
pag               194 fs/xfs/scrub/fscounters.c 		fsc->fdblocks -= pag->pag_meta_resv.ar_reserved;
pag               195 fs/xfs/scrub/fscounters.c 		fsc->fdblocks -= pag->pag_rmapbt_resv.ar_orig_reserved;
pag               197 fs/xfs/scrub/fscounters.c 		xfs_perag_put(pag);
pag               129 fs/xfs/scrub/health.c 	struct xfs_perag	*pag;
pag               138 fs/xfs/scrub/health.c 		pag = xfs_perag_get(sc->mp, sc->sm->sm_agno);
pag               140 fs/xfs/scrub/health.c 			xfs_ag_mark_sick(pag, sc->sick_mask);
pag               142 fs/xfs/scrub/health.c 			xfs_ag_mark_healthy(pag, sc->sick_mask);
pag               143 fs/xfs/scrub/health.c 		xfs_perag_put(pag);
pag               175 fs/xfs/scrub/health.c 	struct xfs_perag	*pag,
pag               223 fs/xfs/scrub/health.c 	if (xfs_ag_has_sickness(pag, mask)) {
pag                11 fs/xfs/scrub/health.h bool xchk_ag_btree_healthy_enough(struct xfs_scrub *sc, struct xfs_perag *pag,
pag               160 fs/xfs/scrub/repair.c 	struct xfs_perag	*pag,
pag               164 fs/xfs/scrub/repair.c 	return  !xfs_ag_resv_critical(pag, XFS_AG_RESV_RMAPBT) &&
pag               165 fs/xfs/scrub/repair.c 		!xfs_ag_resv_critical(pag, XFS_AG_RESV_METADATA) &&
pag               166 fs/xfs/scrub/repair.c 		pag->pagf_freeblks > xfs_ag_resv_needed(pag, type) + nr_blocks;
pag               180 fs/xfs/scrub/repair.c 	struct xfs_perag		*pag;
pag               195 fs/xfs/scrub/repair.c 	pag = xfs_perag_get(mp, sm->sm_agno);
pag               196 fs/xfs/scrub/repair.c 	if (pag->pagi_init) {
pag               198 fs/xfs/scrub/repair.c 		icount = pag->pagi_count;
pag               203 fs/xfs/scrub/repair.c 			icount = pag->pagi_count;
pag               216 fs/xfs/scrub/repair.c 	xfs_perag_put(pag);
pag               476 fs/xfs/scrub/repair.c 	args.pag = sc->sa.pag;
pag                21 fs/xfs/scrub/repair.h bool xrep_ag_has_space(struct xfs_perag *pag, xfs_extlen_t nr_blocks,
pag                40 fs/xfs/scrub/scrub.h 	struct xfs_perag	*pag;
pag               536 fs/xfs/xfs_buf.c 	struct xfs_perag	*pag)
pag               538 fs/xfs/xfs_buf.c 	spin_lock_init(&pag->pag_buf_lock);
pag               539 fs/xfs/xfs_buf.c 	return rhashtable_init(&pag->pag_buf_hash, &xfs_buf_hash_params);
pag               544 fs/xfs/xfs_buf.c 	struct xfs_perag	*pag)
pag               546 fs/xfs/xfs_buf.c 	rhashtable_destroy(&pag->pag_buf_hash);
pag               576 fs/xfs/xfs_buf.c 	struct xfs_perag	*pag;
pag               604 fs/xfs/xfs_buf.c 	pag = xfs_perag_get(btp->bt_mount,
pag               607 fs/xfs/xfs_buf.c 	spin_lock(&pag->pag_buf_lock);
pag               608 fs/xfs/xfs_buf.c 	bp = rhashtable_lookup_fast(&pag->pag_buf_hash, &cmap,
pag               618 fs/xfs/xfs_buf.c 		spin_unlock(&pag->pag_buf_lock);
pag               619 fs/xfs/xfs_buf.c 		xfs_perag_put(pag);
pag               624 fs/xfs/xfs_buf.c 	new_bp->b_pag = pag;
pag               625 fs/xfs/xfs_buf.c 	rhashtable_insert_fast(&pag->pag_buf_hash, &new_bp->b_rhash_head,
pag               627 fs/xfs/xfs_buf.c 	spin_unlock(&pag->pag_buf_lock);
pag               632 fs/xfs/xfs_buf.c 	spin_unlock(&pag->pag_buf_lock);
pag               633 fs/xfs/xfs_buf.c 	xfs_perag_put(pag);
pag               978 fs/xfs/xfs_buf.c 	struct xfs_perag	*pag = bp->b_pag;
pag               984 fs/xfs/xfs_buf.c 	if (!pag) {
pag              1006 fs/xfs/xfs_buf.c 	release = atomic_dec_and_lock(&bp->b_hold, &pag->pag_buf_lock);
pag              1031 fs/xfs/xfs_buf.c 		spin_unlock(&pag->pag_buf_lock);
pag              1046 fs/xfs/xfs_buf.c 		rhashtable_remove_fast(&pag->pag_buf_hash, &bp->b_rhash_head,
pag              1048 fs/xfs/xfs_buf.c 		spin_unlock(&pag->pag_buf_lock);
pag              1049 fs/xfs/xfs_buf.c 		xfs_perag_put(pag);
pag                33 fs/xfs/xfs_discard.c 	struct xfs_perag	*pag;
pag                37 fs/xfs/xfs_discard.c 	pag = xfs_perag_get(mp, agno);
pag               132 fs/xfs/xfs_discard.c 	xfs_perag_put(pag);
pag                32 fs/xfs/xfs_extent_busy.c 	struct xfs_perag	*pag;
pag                46 fs/xfs/xfs_extent_busy.c 	pag = xfs_perag_get(tp->t_mountp, new->agno);
pag                47 fs/xfs/xfs_extent_busy.c 	spin_lock(&pag->pagb_lock);
pag                48 fs/xfs/xfs_extent_busy.c 	rbp = &pag->pagb_tree.rb_node;
pag                65 fs/xfs/xfs_extent_busy.c 	rb_insert_color(&new->rb_node, &pag->pagb_tree);
pag                68 fs/xfs/xfs_extent_busy.c 	spin_unlock(&pag->pagb_lock);
pag                69 fs/xfs/xfs_extent_busy.c 	xfs_perag_put(pag);
pag                88 fs/xfs/xfs_extent_busy.c 	struct xfs_perag	*pag;
pag                93 fs/xfs/xfs_extent_busy.c 	pag = xfs_perag_get(mp, agno);
pag                94 fs/xfs/xfs_extent_busy.c 	spin_lock(&pag->pagb_lock);
pag                96 fs/xfs/xfs_extent_busy.c 	rbp = pag->pagb_tree.rb_node;
pag               117 fs/xfs/xfs_extent_busy.c 	spin_unlock(&pag->pagb_lock);
pag               118 fs/xfs/xfs_extent_busy.c 	xfs_perag_put(pag);
pag               136 fs/xfs/xfs_extent_busy.c 	struct xfs_perag	*pag,
pag               140 fs/xfs/xfs_extent_busy.c 	bool			userdata) __releases(&pag->pagb_lock)
pag               141 fs/xfs/xfs_extent_busy.c 					  __acquires(&pag->pagb_lock)
pag               153 fs/xfs/xfs_extent_busy.c 		spin_unlock(&pag->pagb_lock);
pag               155 fs/xfs/xfs_extent_busy.c 		spin_lock(&pag->pagb_lock);
pag               228 fs/xfs/xfs_extent_busy.c 		rb_erase(&busyp->rb_node, &pag->pagb_tree);
pag               266 fs/xfs/xfs_extent_busy.c 	trace_xfs_extent_busy_reuse(mp, pag->pag_agno, fbno, flen);
pag               270 fs/xfs/xfs_extent_busy.c 	spin_unlock(&pag->pagb_lock);
pag               272 fs/xfs/xfs_extent_busy.c 	trace_xfs_extent_busy_force(mp, pag->pag_agno, fbno, flen);
pag               273 fs/xfs/xfs_extent_busy.c 	spin_lock(&pag->pagb_lock);
pag               289 fs/xfs/xfs_extent_busy.c 	struct xfs_perag	*pag;
pag               294 fs/xfs/xfs_extent_busy.c 	pag = xfs_perag_get(mp, agno);
pag               295 fs/xfs/xfs_extent_busy.c 	spin_lock(&pag->pagb_lock);
pag               297 fs/xfs/xfs_extent_busy.c 	rbp = pag->pagb_tree.rb_node;
pag               312 fs/xfs/xfs_extent_busy.c 		if (!xfs_extent_busy_update_extent(mp, pag, busyp, fbno, flen,
pag               316 fs/xfs/xfs_extent_busy.c 	spin_unlock(&pag->pagb_lock);
pag               317 fs/xfs/xfs_extent_busy.c 	xfs_perag_put(pag);
pag               346 fs/xfs/xfs_extent_busy.c 	spin_lock(&args->pag->pagb_lock);
pag               350 fs/xfs/xfs_extent_busy.c 	rbp = args->pag->pagb_tree.rb_node;
pag               372 fs/xfs/xfs_extent_busy.c 			if (!xfs_extent_busy_update_extent(args->mp, args->pag,
pag               508 fs/xfs/xfs_extent_busy.c 		*busy_gen = args->pag->pagb_gen;
pag               511 fs/xfs/xfs_extent_busy.c 	spin_unlock(&args->pag->pagb_lock);
pag               525 fs/xfs/xfs_extent_busy.c 	struct xfs_perag	*pag,
pag               531 fs/xfs/xfs_extent_busy.c 		rb_erase(&busyp->rb_node, &pag->pagb_tree);
pag               540 fs/xfs/xfs_extent_busy.c 	struct xfs_perag	*pag,
pag               542 fs/xfs/xfs_extent_busy.c 		__releases(pag->pagb_lock)
pag               545 fs/xfs/xfs_extent_busy.c 		pag->pagb_gen++;
pag               546 fs/xfs/xfs_extent_busy.c 		wake_up_all(&pag->pagb_wait);
pag               549 fs/xfs/xfs_extent_busy.c 	spin_unlock(&pag->pagb_lock);
pag               550 fs/xfs/xfs_extent_busy.c 	xfs_perag_put(pag);
pag               565 fs/xfs/xfs_extent_busy.c 	struct xfs_perag	*pag = NULL;
pag               571 fs/xfs/xfs_extent_busy.c 			if (pag)
pag               572 fs/xfs/xfs_extent_busy.c 				xfs_extent_busy_put_pag(pag, wakeup);
pag               574 fs/xfs/xfs_extent_busy.c 			pag = xfs_perag_get(mp, agno);
pag               575 fs/xfs/xfs_extent_busy.c 			spin_lock(&pag->pagb_lock);
pag               583 fs/xfs/xfs_extent_busy.c 			xfs_extent_busy_clear_one(mp, pag, busyp);
pag               588 fs/xfs/xfs_extent_busy.c 	if (pag)
pag               589 fs/xfs/xfs_extent_busy.c 		xfs_extent_busy_put_pag(pag, wakeup);
pag               598 fs/xfs/xfs_extent_busy.c 	struct xfs_perag	*pag,
pag               609 fs/xfs/xfs_extent_busy.c 		prepare_to_wait(&pag->pagb_wait, &wait, TASK_KILLABLE);
pag               610 fs/xfs/xfs_extent_busy.c 		if  (busy_gen != READ_ONCE(pag->pagb_gen))
pag               615 fs/xfs/xfs_extent_busy.c 	finish_wait(&pag->pagb_wait, &wait);
pag               626 fs/xfs/xfs_extent_busy.c 		struct xfs_perag *pag = xfs_perag_get(mp, agno);
pag               629 fs/xfs/xfs_extent_busy.c 			prepare_to_wait(&pag->pagb_wait, &wait, TASK_KILLABLE);
pag               630 fs/xfs/xfs_extent_busy.c 			if  (RB_EMPTY_ROOT(&pag->pagb_tree))
pag               634 fs/xfs/xfs_extent_busy.c 		finish_wait(&pag->pagb_wait, &wait);
pag               636 fs/xfs/xfs_extent_busy.c 		xfs_perag_put(pag);
pag                54 fs/xfs/xfs_extent_busy.h xfs_extent_busy_flush(struct xfs_mount *mp, struct xfs_perag *pag,
pag                74 fs/xfs/xfs_filestream.c 	struct xfs_perag *pag;
pag                77 fs/xfs/xfs_filestream.c 	pag = xfs_perag_get(mp, agno);
pag                78 fs/xfs/xfs_filestream.c 	ret = atomic_read(&pag->pagf_fstrms);
pag                79 fs/xfs/xfs_filestream.c 	xfs_perag_put(pag);
pag                88 fs/xfs/xfs_filestream.c 	struct xfs_perag *pag;
pag                91 fs/xfs/xfs_filestream.c 	pag = xfs_perag_get(mp, agno);
pag                92 fs/xfs/xfs_filestream.c 	ret = atomic_inc_return(&pag->pagf_fstrms);
pag                93 fs/xfs/xfs_filestream.c 	xfs_perag_put(pag);
pag               102 fs/xfs/xfs_filestream.c 	struct xfs_perag *pag;
pag               104 fs/xfs/xfs_filestream.c 	pag = xfs_perag_get(mp, agno);
pag               105 fs/xfs/xfs_filestream.c 	atomic_dec(&pag->pagf_fstrms);
pag               106 fs/xfs/xfs_filestream.c 	xfs_perag_put(pag);
pag               138 fs/xfs/xfs_filestream.c 	struct xfs_perag	*pag;
pag               157 fs/xfs/xfs_filestream.c 		pag = xfs_perag_get(mp, ag);
pag               159 fs/xfs/xfs_filestream.c 		if (!pag->pagf_init) {
pag               162 fs/xfs/xfs_filestream.c 				xfs_perag_put(pag);
pag               168 fs/xfs/xfs_filestream.c 		if (!pag->pagf_init)
pag               172 fs/xfs/xfs_filestream.c 		if (pag->pagf_freeblks > maxfree) {
pag               173 fs/xfs/xfs_filestream.c 			maxfree = pag->pagf_freeblks;
pag               188 fs/xfs/xfs_filestream.c 		longest = xfs_alloc_longest_free_extent(pag,
pag               189 fs/xfs/xfs_filestream.c 				xfs_alloc_min_freelist(mp, pag),
pag               190 fs/xfs/xfs_filestream.c 				xfs_ag_resv_needed(pag, XFS_AG_RESV_NONE));
pag               192 fs/xfs/xfs_filestream.c 		     (!minlen && pag->pagf_freeblks >= minfree)) &&
pag               193 fs/xfs/xfs_filestream.c 		    (!pag->pagf_metadata || !(flags & XFS_PICK_USERDATA) ||
pag               197 fs/xfs/xfs_filestream.c 			free = pag->pagf_freeblks;
pag               198 fs/xfs/xfs_filestream.c 			xfs_perag_put(pag);
pag               206 fs/xfs/xfs_filestream.c 		xfs_perag_put(pag);
pag               147 fs/xfs/xfs_fsops.c 		struct xfs_perag	*pag;
pag               149 fs/xfs/xfs_fsops.c 		pag = xfs_perag_get(mp, id.agno);
pag               150 fs/xfs/xfs_fsops.c 		error = xfs_ag_resv_free(pag);
pag               151 fs/xfs/xfs_fsops.c 		xfs_perag_put(pag);
pag               527 fs/xfs/xfs_fsops.c 	struct xfs_perag	*pag;
pag               533 fs/xfs/xfs_fsops.c 		pag = xfs_perag_get(mp, agno);
pag               534 fs/xfs/xfs_fsops.c 		err2 = xfs_ag_resv_init(pag, NULL);
pag               535 fs/xfs/xfs_fsops.c 		xfs_perag_put(pag);
pag               557 fs/xfs/xfs_fsops.c 	struct xfs_perag	*pag;
pag               562 fs/xfs/xfs_fsops.c 		pag = xfs_perag_get(mp, agno);
pag               563 fs/xfs/xfs_fsops.c 		err2 = xfs_ag_resv_free(pag);
pag               564 fs/xfs/xfs_fsops.c 		xfs_perag_put(pag);
pag                27 fs/xfs/xfs_health.c 	struct xfs_perag	*pag;
pag                38 fs/xfs/xfs_health.c 		pag = xfs_perag_get(mp, agno);
pag                39 fs/xfs/xfs_health.c 		xfs_ag_measure_sickness(pag, &sick, &checked);
pag                44 fs/xfs/xfs_health.c 		xfs_perag_put(pag);
pag               181 fs/xfs/xfs_health.c 	struct xfs_perag	*pag,
pag               185 fs/xfs/xfs_health.c 	trace_xfs_ag_mark_sick(pag->pag_mount, pag->pag_agno, mask);
pag               187 fs/xfs/xfs_health.c 	spin_lock(&pag->pag_state_lock);
pag               188 fs/xfs/xfs_health.c 	pag->pag_sick |= mask;
pag               189 fs/xfs/xfs_health.c 	pag->pag_checked |= mask;
pag               190 fs/xfs/xfs_health.c 	spin_unlock(&pag->pag_state_lock);
pag               196 fs/xfs/xfs_health.c 	struct xfs_perag	*pag,
pag               200 fs/xfs/xfs_health.c 	trace_xfs_ag_mark_healthy(pag->pag_mount, pag->pag_agno, mask);
pag               202 fs/xfs/xfs_health.c 	spin_lock(&pag->pag_state_lock);
pag               203 fs/xfs/xfs_health.c 	pag->pag_sick &= ~mask;
pag               204 fs/xfs/xfs_health.c 	pag->pag_checked |= mask;
pag               205 fs/xfs/xfs_health.c 	spin_unlock(&pag->pag_state_lock);
pag               211 fs/xfs/xfs_health.c 	struct xfs_perag	*pag,
pag               215 fs/xfs/xfs_health.c 	spin_lock(&pag->pag_state_lock);
pag               216 fs/xfs/xfs_health.c 	*sick = pag->pag_sick;
pag               217 fs/xfs/xfs_health.c 	*checked = pag->pag_checked;
pag               218 fs/xfs/xfs_health.c 	spin_unlock(&pag->pag_state_lock);
pag               337 fs/xfs/xfs_health.c 	struct xfs_perag		*pag,
pag               347 fs/xfs/xfs_health.c 	xfs_ag_measure_sickness(pag, &sick, &checked);
pag               181 fs/xfs/xfs_icache.c 	struct xfs_perag	*pag)
pag               183 fs/xfs/xfs_icache.c 	struct xfs_mount	*mp = pag->pag_mount;
pag               185 fs/xfs/xfs_icache.c 	lockdep_assert_held(&pag->pag_ici_lock);
pag               186 fs/xfs/xfs_icache.c 	if (pag->pag_ici_reclaimable++)
pag               191 fs/xfs/xfs_icache.c 	radix_tree_tag_set(&mp->m_perag_tree, pag->pag_agno,
pag               198 fs/xfs/xfs_icache.c 	trace_xfs_perag_set_reclaim(mp, pag->pag_agno, -1, _RET_IP_);
pag               203 fs/xfs/xfs_icache.c 	struct xfs_perag	*pag)
pag               205 fs/xfs/xfs_icache.c 	struct xfs_mount	*mp = pag->pag_mount;
pag               207 fs/xfs/xfs_icache.c 	lockdep_assert_held(&pag->pag_ici_lock);
pag               208 fs/xfs/xfs_icache.c 	if (--pag->pag_ici_reclaimable)
pag               213 fs/xfs/xfs_icache.c 	radix_tree_tag_clear(&mp->m_perag_tree, pag->pag_agno,
pag               216 fs/xfs/xfs_icache.c 	trace_xfs_perag_clear_reclaim(mp, pag->pag_agno, -1, _RET_IP_);
pag               230 fs/xfs/xfs_icache.c 	struct xfs_perag	*pag;
pag               232 fs/xfs/xfs_icache.c 	pag = xfs_perag_get(mp, XFS_INO_TO_AGNO(mp, ip->i_ino));
pag               233 fs/xfs/xfs_icache.c 	spin_lock(&pag->pag_ici_lock);
pag               236 fs/xfs/xfs_icache.c 	radix_tree_tag_set(&pag->pag_ici_root, XFS_INO_TO_AGINO(mp, ip->i_ino),
pag               238 fs/xfs/xfs_icache.c 	xfs_perag_set_reclaim_tag(pag);
pag               242 fs/xfs/xfs_icache.c 	spin_unlock(&pag->pag_ici_lock);
pag               243 fs/xfs/xfs_icache.c 	xfs_perag_put(pag);
pag               248 fs/xfs/xfs_icache.c 	struct xfs_perag	*pag,
pag               251 fs/xfs/xfs_icache.c 	radix_tree_tag_clear(&pag->pag_ici_root,
pag               252 fs/xfs/xfs_icache.c 			     XFS_INO_TO_AGINO(pag->pag_mount, ino),
pag               254 fs/xfs/xfs_icache.c 	xfs_perag_clear_reclaim_tag(pag);
pag               348 fs/xfs/xfs_icache.c 	struct xfs_perag	*pag,
pag               440 fs/xfs/xfs_icache.c 		spin_lock(&pag->pag_ici_lock);
pag               450 fs/xfs/xfs_icache.c 		xfs_inode_clear_reclaim_tag(pag, ip->i_ino);
pag               459 fs/xfs/xfs_icache.c 		spin_unlock(&pag->pag_ici_lock);
pag               493 fs/xfs/xfs_icache.c 	struct xfs_perag	*pag,
pag               567 fs/xfs/xfs_icache.c 	spin_lock(&pag->pag_ici_lock);
pag               568 fs/xfs/xfs_icache.c 	error = radix_tree_insert(&pag->pag_ici_root, agino, ip);
pag               575 fs/xfs/xfs_icache.c 	spin_unlock(&pag->pag_ici_lock);
pag               582 fs/xfs/xfs_icache.c 	spin_unlock(&pag->pag_ici_lock);
pag               625 fs/xfs/xfs_icache.c 	xfs_perag_t	*pag;
pag               644 fs/xfs/xfs_icache.c 	pag = xfs_perag_get(mp, XFS_INO_TO_AGNO(mp, ino));
pag               650 fs/xfs/xfs_icache.c 	ip = radix_tree_lookup(&pag->pag_ici_root, agino);
pag               653 fs/xfs/xfs_icache.c 		error = xfs_iget_cache_hit(pag, ip, ino, flags, lock_flags);
pag               664 fs/xfs/xfs_icache.c 		error = xfs_iget_cache_miss(mp, pag, tp, ino, &ip,
pag               669 fs/xfs/xfs_icache.c 	xfs_perag_put(pag);
pag               686 fs/xfs/xfs_icache.c 	xfs_perag_put(pag);
pag               784 fs/xfs/xfs_icache.c 	struct xfs_perag	*pag,
pag               811 fs/xfs/xfs_icache.c 			nr_found = radix_tree_gang_lookup(&pag->pag_ici_root,
pag               816 fs/xfs/xfs_icache.c 					&pag->pag_ici_root,
pag               847 fs/xfs/xfs_icache.c 			if (XFS_INO_TO_AGNO(mp, ip->i_ino) != pag->pag_agno)
pag               960 fs/xfs/xfs_icache.c 	struct xfs_perag	*pag;
pag               966 fs/xfs/xfs_icache.c 	while ((pag = xfs_perag_get(mp, ag))) {
pag               967 fs/xfs/xfs_icache.c 		ag = pag->pag_agno + 1;
pag               968 fs/xfs/xfs_icache.c 		error = xfs_inode_ag_walk(mp, pag, execute, flags, args, -1,
pag               970 fs/xfs/xfs_icache.c 		xfs_perag_put(pag);
pag              1000 fs/xfs/xfs_icache.c 	struct xfs_perag	*pag;
pag              1006 fs/xfs/xfs_icache.c 	while ((pag = xfs_perag_get_tag(mp, ag, tag))) {
pag              1007 fs/xfs/xfs_icache.c 		ag = pag->pag_agno + 1;
pag              1008 fs/xfs/xfs_icache.c 		error = xfs_inode_ag_walk(mp, pag, execute, flags, args, tag,
pag              1010 fs/xfs/xfs_icache.c 		xfs_perag_put(pag);
pag              1108 fs/xfs/xfs_icache.c 	struct xfs_perag	*pag,
pag              1204 fs/xfs/xfs_icache.c 	spin_lock(&pag->pag_ici_lock);
pag              1205 fs/xfs/xfs_icache.c 	if (!radix_tree_delete(&pag->pag_ici_root,
pag              1208 fs/xfs/xfs_icache.c 	xfs_perag_clear_reclaim_tag(pag);
pag              1209 fs/xfs/xfs_icache.c 	spin_unlock(&pag->pag_ici_lock);
pag              1253 fs/xfs/xfs_icache.c 	struct xfs_perag	*pag;
pag              1263 fs/xfs/xfs_icache.c 	while ((pag = xfs_perag_get_tag(mp, ag, XFS_ICI_RECLAIM_TAG))) {
pag              1268 fs/xfs/xfs_icache.c 		ag = pag->pag_agno + 1;
pag              1271 fs/xfs/xfs_icache.c 			if (!mutex_trylock(&pag->pag_ici_reclaim_lock)) {
pag              1273 fs/xfs/xfs_icache.c 				xfs_perag_put(pag);
pag              1276 fs/xfs/xfs_icache.c 			first_index = pag->pag_ici_reclaim_cursor;
pag              1278 fs/xfs/xfs_icache.c 			mutex_lock(&pag->pag_ici_reclaim_lock);
pag              1286 fs/xfs/xfs_icache.c 					&pag->pag_ici_root,
pag              1321 fs/xfs/xfs_icache.c 								pag->pag_agno)
pag              1334 fs/xfs/xfs_icache.c 				error = xfs_reclaim_inode(batch[i], pag, flags);
pag              1346 fs/xfs/xfs_icache.c 			pag->pag_ici_reclaim_cursor = first_index;
pag              1348 fs/xfs/xfs_icache.c 			pag->pag_ici_reclaim_cursor = 0;
pag              1349 fs/xfs/xfs_icache.c 		mutex_unlock(&pag->pag_ici_reclaim_lock);
pag              1350 fs/xfs/xfs_icache.c 		xfs_perag_put(pag);
pag              1406 fs/xfs/xfs_icache.c 	struct xfs_perag	*pag;
pag              1410 fs/xfs/xfs_icache.c 	while ((pag = xfs_perag_get_tag(mp, ag, XFS_ICI_RECLAIM_TAG))) {
pag              1411 fs/xfs/xfs_icache.c 		ag = pag->pag_agno + 1;
pag              1412 fs/xfs/xfs_icache.c 		reclaimable += pag->pag_ici_reclaimable;
pag              1413 fs/xfs/xfs_icache.c 		xfs_perag_put(pag);
pag              1619 fs/xfs/xfs_icache.c 	struct xfs_perag *pag;
pag              1632 fs/xfs/xfs_icache.c 	pag = xfs_perag_get(mp, XFS_INO_TO_AGNO(mp, ip->i_ino));
pag              1633 fs/xfs/xfs_icache.c 	spin_lock(&pag->pag_ici_lock);
pag              1635 fs/xfs/xfs_icache.c 	tagged = radix_tree_tagged(&pag->pag_ici_root, tag);
pag              1636 fs/xfs/xfs_icache.c 	radix_tree_tag_set(&pag->pag_ici_root,
pag              1649 fs/xfs/xfs_icache.c 		set_tp(ip->i_mount, pag->pag_agno, -1, _RET_IP_);
pag              1652 fs/xfs/xfs_icache.c 	spin_unlock(&pag->pag_ici_lock);
pag              1653 fs/xfs/xfs_icache.c 	xfs_perag_put(pag);
pag              1674 fs/xfs/xfs_icache.c 	struct xfs_perag *pag;
pag              1680 fs/xfs/xfs_icache.c 	pag = xfs_perag_get(mp, XFS_INO_TO_AGNO(mp, ip->i_ino));
pag              1681 fs/xfs/xfs_icache.c 	spin_lock(&pag->pag_ici_lock);
pag              1683 fs/xfs/xfs_icache.c 	radix_tree_tag_clear(&pag->pag_ici_root,
pag              1685 fs/xfs/xfs_icache.c 	if (!radix_tree_tagged(&pag->pag_ici_root, tag)) {
pag              1692 fs/xfs/xfs_icache.c 		clear_tp(ip->i_mount, pag->pag_agno, -1, _RET_IP_);
pag              1695 fs/xfs/xfs_icache.c 	spin_unlock(&pag->pag_ici_lock);
pag              1696 fs/xfs/xfs_icache.c 	xfs_perag_put(pag);
pag              1966 fs/xfs/xfs_inode.c 	struct xfs_perag	*pag,
pag              1971 fs/xfs/xfs_inode.c 	iu = rhashtable_lookup_fast(&pag->pagi_unlinked_hash, &agino,
pag              1983 fs/xfs/xfs_inode.c 	struct xfs_perag	*pag,
pag              1988 fs/xfs/xfs_inode.c 	error = rhashtable_insert_fast(&pag->pagi_unlinked_hash,
pag              2012 fs/xfs/xfs_inode.c 	struct xfs_perag	*pag,
pag              2018 fs/xfs/xfs_inode.c 	if (XFS_TEST_ERROR(false, pag->pag_mount, XFS_ERRTAG_IUNLINK_FALLBACK))
pag              2025 fs/xfs/xfs_inode.c 	return xfs_iunlink_insert_backref(pag, iu);
pag              2035 fs/xfs/xfs_inode.c 	struct xfs_perag	*pag,
pag              2043 fs/xfs/xfs_inode.c 	iu = rhashtable_lookup_fast(&pag->pagi_unlinked_hash, &agino,
pag              2056 fs/xfs/xfs_inode.c 	error = rhashtable_remove_fast(&pag->pagi_unlinked_hash,
pag              2069 fs/xfs/xfs_inode.c 	return xfs_iunlink_insert_backref(pag, iu);
pag              2075 fs/xfs/xfs_inode.c 	struct xfs_perag	*pag)
pag              2077 fs/xfs/xfs_inode.c 	return rhashtable_init(&pag->pagi_unlinked_hash,
pag              2096 fs/xfs/xfs_inode.c 	struct xfs_perag	*pag)
pag              2100 fs/xfs/xfs_inode.c 	rhashtable_free_and_destroy(&pag->pagi_unlinked_hash,
pag              2103 fs/xfs/xfs_inode.c 	ASSERT(freed_anything == false || XFS_FORCED_SHUTDOWN(pag->pag_mount));
pag              2264 fs/xfs/xfs_inode.c 		struct xfs_perag	*pag;
pag              2281 fs/xfs/xfs_inode.c 		pag = xfs_perag_get(mp, agno);
pag              2282 fs/xfs/xfs_inode.c 		error = xfs_iunlink_add_backref(pag, agino, next_agino);
pag              2283 fs/xfs/xfs_inode.c 		xfs_perag_put(pag);
pag              2343 fs/xfs/xfs_inode.c 	struct xfs_perag	*pag)
pag              2353 fs/xfs/xfs_inode.c 	*agino = xfs_iunlink_lookup_backref(pag, target_agino);
pag              2419 fs/xfs/xfs_inode.c 	struct xfs_perag	*pag = NULL;
pag              2463 fs/xfs/xfs_inode.c 		pag = xfs_perag_get(mp, agno);
pag              2464 fs/xfs/xfs_inode.c 		error = xfs_iunlink_change_backref(pag, next_agino,
pag              2480 fs/xfs/xfs_inode.c 		if (!pag)
pag              2481 fs/xfs/xfs_inode.c 			pag = xfs_perag_get(mp, agno);
pag              2486 fs/xfs/xfs_inode.c 				pag);
pag              2502 fs/xfs/xfs_inode.c 		error = xfs_iunlink_change_backref(pag, agino, next_agino);
pag              2508 fs/xfs/xfs_inode.c 	if (pag)
pag              2509 fs/xfs/xfs_inode.c 		xfs_perag_put(pag);
pag              2533 fs/xfs/xfs_inode.c 	struct xfs_perag	*pag;
pag              2538 fs/xfs/xfs_inode.c 	pag = xfs_perag_get(mp, XFS_INO_TO_AGNO(mp, inum));
pag              2615 fs/xfs/xfs_inode.c 			ip = radix_tree_lookup(&pag->pag_ici_root,
pag              2702 fs/xfs/xfs_inode.c 	xfs_perag_put(pag);
pag              3469 fs/xfs/xfs_inode.c 	struct xfs_perag	*pag;
pag              3479 fs/xfs/xfs_inode.c 	pag = xfs_perag_get(mp, XFS_INO_TO_AGNO(mp, ip->i_ino));
pag              3490 fs/xfs/xfs_inode.c 	nr_found = radix_tree_gang_lookup(&pag->pag_ici_root, (void**)cilist,
pag              3589 fs/xfs/xfs_inode.c 	xfs_perag_put(pag);
pag              3619 fs/xfs/xfs_inode.c 	xfs_perag_put(pag);
pag               516 fs/xfs/xfs_inode.h int xfs_iunlink_init(struct xfs_perag *pag);
pag               517 fs/xfs/xfs_inode.h void xfs_iunlink_destroy(struct xfs_perag *pag);
pag               127 fs/xfs/xfs_mount.c 	struct xfs_perag *pag = container_of(head, struct xfs_perag, rcu_head);
pag               129 fs/xfs/xfs_mount.c 	ASSERT(atomic_read(&pag->pag_ref) == 0);
pag               130 fs/xfs/xfs_mount.c 	kmem_free(pag);
pag               141 fs/xfs/xfs_mount.c 	struct xfs_perag *pag;
pag               145 fs/xfs/xfs_mount.c 		pag = radix_tree_delete(&mp->m_perag_tree, agno);
pag               147 fs/xfs/xfs_mount.c 		ASSERT(pag);
pag               148 fs/xfs/xfs_mount.c 		ASSERT(atomic_read(&pag->pag_ref) == 0);
pag               149 fs/xfs/xfs_mount.c 		xfs_iunlink_destroy(pag);
pag               150 fs/xfs/xfs_mount.c 		xfs_buf_hash_destroy(pag);
pag               151 fs/xfs/xfs_mount.c 		mutex_destroy(&pag->pag_ici_reclaim_lock);
pag               152 fs/xfs/xfs_mount.c 		call_rcu(&pag->rcu_head, __xfs_free_perag);
pag               182 fs/xfs/xfs_mount.c 	xfs_perag_t	*pag;
pag               191 fs/xfs/xfs_mount.c 		pag = xfs_perag_get(mp, index);
pag               192 fs/xfs/xfs_mount.c 		if (pag) {
pag               193 fs/xfs/xfs_mount.c 			xfs_perag_put(pag);
pag               197 fs/xfs/xfs_mount.c 		pag = kmem_zalloc(sizeof(*pag), KM_MAYFAIL);
pag               198 fs/xfs/xfs_mount.c 		if (!pag)
pag               200 fs/xfs/xfs_mount.c 		pag->pag_agno = index;
pag               201 fs/xfs/xfs_mount.c 		pag->pag_mount = mp;
pag               202 fs/xfs/xfs_mount.c 		spin_lock_init(&pag->pag_ici_lock);
pag               203 fs/xfs/xfs_mount.c 		mutex_init(&pag->pag_ici_reclaim_lock);
pag               204 fs/xfs/xfs_mount.c 		INIT_RADIX_TREE(&pag->pag_ici_root, GFP_ATOMIC);
pag               205 fs/xfs/xfs_mount.c 		if (xfs_buf_hash_init(pag))
pag               207 fs/xfs/xfs_mount.c 		init_waitqueue_head(&pag->pagb_wait);
pag               208 fs/xfs/xfs_mount.c 		spin_lock_init(&pag->pagb_lock);
pag               209 fs/xfs/xfs_mount.c 		pag->pagb_count = 0;
pag               210 fs/xfs/xfs_mount.c 		pag->pagb_tree = RB_ROOT;
pag               216 fs/xfs/xfs_mount.c 		if (radix_tree_insert(&mp->m_perag_tree, index, pag)) {
pag               228 fs/xfs/xfs_mount.c 		error = xfs_iunlink_init(pag);
pag               231 fs/xfs/xfs_mount.c 		spin_lock_init(&pag->pag_state_lock);
pag               243 fs/xfs/xfs_mount.c 	xfs_buf_hash_destroy(pag);
pag               245 fs/xfs/xfs_mount.c 	mutex_destroy(&pag->pag_ici_reclaim_lock);
pag               246 fs/xfs/xfs_mount.c 	kmem_free(pag);
pag               250 fs/xfs/xfs_mount.c 		pag = radix_tree_delete(&mp->m_perag_tree, index);
pag               251 fs/xfs/xfs_mount.c 		if (!pag)
pag               253 fs/xfs/xfs_mount.c 		xfs_buf_hash_destroy(pag);
pag               254 fs/xfs/xfs_mount.c 		xfs_iunlink_destroy(pag);
pag               255 fs/xfs/xfs_mount.c 		mutex_destroy(&pag->pag_ici_reclaim_lock);
pag               256 fs/xfs/xfs_mount.c 		kmem_free(pag);
pag               417 fs/xfs/xfs_mount.h 	struct xfs_perag	*pag,
pag               422 fs/xfs/xfs_mount.h 		return &pag->pag_meta_resv;
pag               424 fs/xfs/xfs_mount.h 		return &pag->pag_rmapbt_resv;
pag               430 fs/xfs/xfs_mount.h int xfs_buf_hash_init(xfs_perag_t *pag);
pag               431 fs/xfs/xfs_mount.h void xfs_buf_hash_destroy(xfs_perag_t *pag);
pag               974 fs/xfs/xfs_reflink.c 	struct xfs_perag	*pag;
pag               980 fs/xfs/xfs_reflink.c 	pag = xfs_perag_get(mp, agno);
pag               981 fs/xfs/xfs_reflink.c 	if (xfs_ag_resv_critical(pag, XFS_AG_RESV_RMAPBT) ||
pag               982 fs/xfs/xfs_reflink.c 	    xfs_ag_resv_critical(pag, XFS_AG_RESV_METADATA))
pag               984 fs/xfs/xfs_reflink.c 	xfs_perag_put(pag);
pag               599 fs/xfs/xfs_super.c 		struct xfs_perag	*pag;
pag               603 fs/xfs/xfs_super.c 		pag = xfs_perag_get(mp, index);
pag               607 fs/xfs/xfs_super.c 				pag->pagi_inodeok = 0;
pag               608 fs/xfs/xfs_super.c 				pag->pagf_metadata = 0;
pag               610 fs/xfs/xfs_super.c 				pag->pagi_inodeok = 1;
pag               613 fs/xfs/xfs_super.c 					pag->pagf_metadata = 1;
pag               615 fs/xfs/xfs_super.c 					pag->pagf_metadata = 0;
pag               618 fs/xfs/xfs_super.c 			pag->pagi_inodeok = 1;
pag               619 fs/xfs/xfs_super.c 			pag->pagf_metadata = 0;
pag               622 fs/xfs/xfs_super.c 		xfs_perag_put(pag);
pag              2577 fs/xfs/xfs_trace.h 	TP_PROTO(struct xfs_perag *pag, enum xfs_ag_resv_type resv,
pag              2579 fs/xfs/xfs_trace.h 	TP_ARGS(pag, resv, len),
pag              2591 fs/xfs/xfs_trace.h 		struct xfs_ag_resv	*r = xfs_perag_resv(pag, resv);
pag              2593 fs/xfs/xfs_trace.h 		__entry->dev = pag->pag_mount->m_super->s_dev;
pag              2594 fs/xfs/xfs_trace.h 		__entry->agno = pag->pag_agno;
pag              2596 fs/xfs/xfs_trace.h 		__entry->freeblks = pag->pagf_freeblks;
pag              2597 fs/xfs/xfs_trace.h 		__entry->flcount = pag->pagf_flcount;
pag              2615 fs/xfs/xfs_trace.h 	TP_PROTO(struct xfs_perag *pag, enum xfs_ag_resv_type type, \
pag              2617 fs/xfs/xfs_trace.h 	TP_ARGS(pag, type, len))