Home
last modified time | relevance | path

Searched refs:pag (Results 1 – 25 of 25) sorted by relevance

/fs/xfs/libxfs/
Dxfs_ag_resv.c89 struct xfs_perag *pag, in xfs_ag_resv_critical() argument
97 avail = pag->pagf_freeblks - pag->pag_agfl_resv.ar_reserved; in xfs_ag_resv_critical()
98 orig = pag->pag_meta_resv.ar_asked; in xfs_ag_resv_critical()
101 avail = pag->pagf_freeblks + pag->pagf_flcount - in xfs_ag_resv_critical()
102 pag->pag_meta_resv.ar_reserved; in xfs_ag_resv_critical()
103 orig = pag->pag_agfl_resv.ar_asked; in xfs_ag_resv_critical()
110 trace_xfs_ag_resv_critical(pag, type, avail); in xfs_ag_resv_critical()
114 pag->pag_mount, XFS_ERRTAG_AG_RESV_CRITICAL, in xfs_ag_resv_critical()
124 struct xfs_perag *pag, in xfs_ag_resv_needed() argument
129 len = pag->pag_meta_resv.ar_reserved + pag->pag_agfl_resv.ar_reserved; in xfs_ag_resv_needed()
[all …]
Dxfs_alloc.c365 ASSERT(args->pag->pagf_freeblks + args->pag->pagf_flcount >= in xfs_alloc_fix_len()
630 struct xfs_perag *pag, in xfs_alloc_update_counters() argument
636 pag->pagf_freeblks += len; in xfs_alloc_update_counters()
708 error = xfs_alloc_update_counters(args->tp, args->pag, in xfs_alloc_ag_vextent()
718 xfs_ag_resv_alloc_extent(args->pag, args->resv, args); in xfs_alloc_ag_vextent()
1548 struct xfs_perag *pag; in xfs_alloc_ag_vextent_small() local
1608 pag = xfs_perag_get(args->mp, args->agno); in xfs_alloc_ag_vextent_small()
1609 xfs_ag_resv_free_extent(pag, XFS_AG_RESV_AGFL, in xfs_alloc_ag_vextent_small()
1611 xfs_perag_put(pag); in xfs_alloc_ag_vextent_small()
1674 xfs_perag_t *pag; /* per allocation group data */ in xfs_free_ag_extent() local
[all …]
Dxfs_ialloc.c609 struct xfs_perag *pag; in xfs_ialloc_ag_alloc() local
870 pag = xfs_perag_get(args.mp, agno); in xfs_ialloc_ag_alloc()
871 pag->pagi_freecount += newlen; in xfs_ialloc_ag_alloc()
872 xfs_perag_put(pag); in xfs_ialloc_ag_alloc()
922 xfs_perag_t *pag; /* per allocation group data */ in xfs_ialloc_ag_select() local
953 pag = xfs_perag_get(mp, agno); in xfs_ialloc_ag_select()
954 if (!pag->pagi_inodeok) { in xfs_ialloc_ag_select()
959 if (!pag->pagi_init) { in xfs_ialloc_ag_select()
965 if (pag->pagi_freecount) { in xfs_ialloc_ag_select()
966 xfs_perag_put(pag); in xfs_ialloc_ag_select()
[all …]
Dxfs_ag_resv.h23 int xfs_ag_resv_free(struct xfs_perag *pag);
24 int xfs_ag_resv_init(struct xfs_perag *pag);
26 bool xfs_ag_resv_critical(struct xfs_perag *pag, enum xfs_ag_resv_type type);
27 xfs_extlen_t xfs_ag_resv_needed(struct xfs_perag *pag,
30 void xfs_ag_resv_alloc_extent(struct xfs_perag *pag, enum xfs_ag_resv_type type,
32 void xfs_ag_resv_free_extent(struct xfs_perag *pag, enum xfs_ag_resv_type type,
Dxfs_sb.c58 struct xfs_perag *pag; in xfs_perag_get() local
62 pag = radix_tree_lookup(&mp->m_perag_tree, agno); in xfs_perag_get()
63 if (pag) { in xfs_perag_get()
64 ASSERT(atomic_read(&pag->pag_ref) >= 0); in xfs_perag_get()
65 ref = atomic_inc_return(&pag->pag_ref); in xfs_perag_get()
69 return pag; in xfs_perag_get()
81 struct xfs_perag *pag; in xfs_perag_get_tag() local
87 (void **)&pag, first, 1, tag); in xfs_perag_get_tag()
92 ref = atomic_inc_return(&pag->pag_ref); in xfs_perag_get_tag()
94 trace_xfs_perag_get_tag(mp, pag->pag_agno, ref, _RET_IP_); in xfs_perag_get_tag()
[all …]
Dxfs_alloc_btree.c55 struct xfs_perag *pag = xfs_perag_get(cur->bc_mp, seqno); in xfs_allocbt_set_root() local
61 pag->pagf_levels[btnum] += inc; in xfs_allocbt_set_root()
62 xfs_perag_put(pag); in xfs_allocbt_set_root()
137 struct xfs_perag *pag; in xfs_allocbt_update_lastrec() local
181 pag = xfs_perag_get(cur->bc_mp, seqno); in xfs_allocbt_update_lastrec()
182 pag->pagf_longest = be32_to_cpu(len); in xfs_allocbt_update_lastrec()
183 xfs_perag_put(pag); in xfs_allocbt_update_lastrec()
265 struct xfs_perag *pag = bp->b_pag; in xfs_allocbt_verify() local
287 if (pag && pag->pagf_init) { in xfs_allocbt_verify()
288 if (level >= pag->pagf_levels[XFS_BTNUM_BNOi]) in xfs_allocbt_verify()
[all …]
Dxfs_refcount_btree.c57 struct xfs_perag *pag = xfs_perag_get(cur->bc_mp, seqno); in xfs_refcountbt_set_root() local
63 pag->pagf_refcount_level += inc; in xfs_refcountbt_set_root()
64 xfs_perag_put(pag); in xfs_refcountbt_set_root()
232 struct xfs_perag *pag = bp->b_pag; in xfs_refcountbt_verify() local
244 if (pag && pag->pagf_init) { in xfs_refcountbt_verify()
245 if (level >= pag->pagf_refcount_level) in xfs_refcountbt_verify()
Dxfs_rmap_btree.c83 struct xfs_perag *pag = xfs_perag_get(cur->bc_mp, seqno); in xfs_rmapbt_set_root() local
89 pag->pagf_levels[btnum] += inc; in xfs_rmapbt_set_root()
90 xfs_perag_put(pag); in xfs_rmapbt_set_root()
312 struct xfs_perag *pag = bp->b_pag; in xfs_rmapbt_verify() local
336 if (pag && pag->pagf_init) { in xfs_rmapbt_verify()
337 if (level >= pag->pagf_levels[XFS_BTNUM_RMAPi]) in xfs_rmapbt_verify()
Dxfs_alloc.h70 struct xfs_perag *pag; /* per-ag struct for this agno */ member
122 struct xfs_perag *pag, xfs_extlen_t need,
125 struct xfs_perag *pag);
Dxfs_sb.h27 extern void xfs_perag_put(struct xfs_perag *pag);
Dxfs_bmap.c3570 struct xfs_perag *pag; in xfs_bmap_longest_free_extent() local
3574 pag = xfs_perag_get(mp, ag); in xfs_bmap_longest_free_extent()
3575 if (!pag->pagf_init) { in xfs_bmap_longest_free_extent()
3580 if (!pag->pagf_init) { in xfs_bmap_longest_free_extent()
3586 longest = xfs_alloc_longest_free_extent(mp, pag, in xfs_bmap_longest_free_extent()
3587 xfs_alloc_min_freelist(mp, pag), in xfs_bmap_longest_free_extent()
3588 xfs_ag_resv_needed(pag, XFS_AG_RESV_NONE)); in xfs_bmap_longest_free_extent()
3593 xfs_perag_put(pag); in xfs_bmap_longest_free_extent()
3994 args.pag = xfs_perag_get(args.mp, args.agno); in xfs_bmap_remap_alloc()
3995 ASSERT(args.pag); in xfs_bmap_remap_alloc()
[all …]
Dxfs_attr_leaf.c256 struct xfs_perag *pag = bp->b_pag; in xfs_attr3_leaf_verify() local
282 if (pag && pag->pagf_init && ichdr.count == 0) in xfs_attr3_leaf_verify()
Dxfs_btree.c4502 struct xfs_perag *pag = bp->b_pag; in xfs_btree_sblock_v5hdr_verify() local
4510 if (pag && be32_to_cpu(block->bb_u.s.bb_owner) != pag->pag_agno) in xfs_btree_sblock_v5hdr_verify()
/fs/xfs/
Dxfs_extent_busy.c44 struct xfs_perag *pag; in xfs_extent_busy_insert() local
58 pag = xfs_perag_get(tp->t_mountp, new->agno); in xfs_extent_busy_insert()
59 spin_lock(&pag->pagb_lock); in xfs_extent_busy_insert()
60 rbp = &pag->pagb_tree.rb_node; in xfs_extent_busy_insert()
77 rb_insert_color(&new->rb_node, &pag->pagb_tree); in xfs_extent_busy_insert()
80 spin_unlock(&pag->pagb_lock); in xfs_extent_busy_insert()
81 xfs_perag_put(pag); in xfs_extent_busy_insert()
100 struct xfs_perag *pag; in xfs_extent_busy_search() local
105 pag = xfs_perag_get(mp, agno); in xfs_extent_busy_search()
106 spin_lock(&pag->pagb_lock); in xfs_extent_busy_search()
[all …]
Dxfs_icache.c190 struct xfs_perag *pag) in xfs_perag_set_reclaim_tag() argument
192 struct xfs_mount *mp = pag->pag_mount; in xfs_perag_set_reclaim_tag()
194 lockdep_assert_held(&pag->pag_ici_lock); in xfs_perag_set_reclaim_tag()
195 if (pag->pag_ici_reclaimable++) in xfs_perag_set_reclaim_tag()
200 radix_tree_tag_set(&mp->m_perag_tree, pag->pag_agno, in xfs_perag_set_reclaim_tag()
207 trace_xfs_perag_set_reclaim(mp, pag->pag_agno, -1, _RET_IP_); in xfs_perag_set_reclaim_tag()
212 struct xfs_perag *pag) in xfs_perag_clear_reclaim_tag() argument
214 struct xfs_mount *mp = pag->pag_mount; in xfs_perag_clear_reclaim_tag()
216 lockdep_assert_held(&pag->pag_ici_lock); in xfs_perag_clear_reclaim_tag()
217 if (--pag->pag_ici_reclaimable) in xfs_perag_clear_reclaim_tag()
[all …]
Dxfs_filestream.c88 struct xfs_perag *pag; in xfs_filestream_peek_ag() local
91 pag = xfs_perag_get(mp, agno); in xfs_filestream_peek_ag()
92 ret = atomic_read(&pag->pagf_fstrms); in xfs_filestream_peek_ag()
93 xfs_perag_put(pag); in xfs_filestream_peek_ag()
102 struct xfs_perag *pag; in xfs_filestream_get_ag() local
105 pag = xfs_perag_get(mp, agno); in xfs_filestream_get_ag()
106 ret = atomic_inc_return(&pag->pagf_fstrms); in xfs_filestream_get_ag()
107 xfs_perag_put(pag); in xfs_filestream_get_ag()
116 struct xfs_perag *pag; in xfs_filestream_put_ag() local
118 pag = xfs_perag_get(mp, agno); in xfs_filestream_put_ag()
[all …]
Dxfs_mount.c138 struct xfs_perag *pag = container_of(head, struct xfs_perag, rcu_head); in __xfs_free_perag() local
140 ASSERT(atomic_read(&pag->pag_ref) == 0); in __xfs_free_perag()
141 kmem_free(pag); in __xfs_free_perag()
152 struct xfs_perag *pag; in xfs_free_perag() local
156 pag = radix_tree_delete(&mp->m_perag_tree, agno); in xfs_free_perag()
158 ASSERT(pag); in xfs_free_perag()
159 ASSERT(atomic_read(&pag->pag_ref) == 0); in xfs_free_perag()
160 call_rcu(&pag->rcu_head, __xfs_free_perag); in xfs_free_perag()
190 xfs_perag_t *pag; in xfs_initialize_perag() local
199 pag = xfs_perag_get(mp, index); in xfs_initialize_perag()
[all …]
Dxfs_fsops.c639 struct xfs_perag *pag; in xfs_growfs_data_private() local
641 pag = xfs_perag_get(mp, agno); in xfs_growfs_data_private()
642 error = xfs_ag_resv_free(pag); in xfs_growfs_data_private()
643 xfs_perag_put(pag); in xfs_growfs_data_private()
1023 struct xfs_perag *pag; in xfs_fs_reserve_ag_blocks() local
1028 pag = xfs_perag_get(mp, agno); in xfs_fs_reserve_ag_blocks()
1029 err2 = xfs_ag_resv_init(pag); in xfs_fs_reserve_ag_blocks()
1030 xfs_perag_put(pag); in xfs_fs_reserve_ag_blocks()
1052 struct xfs_perag *pag; in xfs_fs_unreserve_ag_blocks() local
1057 pag = xfs_perag_get(mp, agno); in xfs_fs_unreserve_ag_blocks()
[all …]
Dxfs_buf.c505 struct xfs_perag *pag; in _xfs_buf_find() local
540 pag = xfs_perag_get(btp->bt_mount, in _xfs_buf_find()
544 spin_lock(&pag->pag_buf_lock); in _xfs_buf_find()
545 rbp = &pag->pag_buf_tree.rb_node; in _xfs_buf_find()
578 rb_insert_color(&new_bp->b_rbnode, &pag->pag_buf_tree); in _xfs_buf_find()
580 new_bp->b_pag = pag; in _xfs_buf_find()
581 spin_unlock(&pag->pag_buf_lock); in _xfs_buf_find()
584 spin_unlock(&pag->pag_buf_lock); in _xfs_buf_find()
585 xfs_perag_put(pag); in _xfs_buf_find()
590 spin_unlock(&pag->pag_buf_lock); in _xfs_buf_find()
[all …]
Dxfs_discard.c47 struct xfs_perag *pag; in xfs_trim_extents() local
51 pag = xfs_perag_get(mp, agno); in xfs_trim_extents()
141 xfs_perag_put(pag); in xfs_trim_extents()
Dxfs_mount.h416 struct xfs_perag *pag, in xfs_perag_resv() argument
421 return &pag->pag_meta_resv; in xfs_perag_resv()
423 return &pag->pag_agfl_resv; in xfs_perag_resv()
Dxfs_super.c645 struct xfs_perag *pag; in xfs_set_inode_alloc() local
649 pag = xfs_perag_get(mp, index); in xfs_set_inode_alloc()
653 pag->pagi_inodeok = 0; in xfs_set_inode_alloc()
654 pag->pagf_metadata = 0; in xfs_set_inode_alloc()
656 pag->pagi_inodeok = 1; in xfs_set_inode_alloc()
659 pag->pagf_metadata = 1; in xfs_set_inode_alloc()
661 pag->pagf_metadata = 0; in xfs_set_inode_alloc()
664 pag->pagi_inodeok = 1; in xfs_set_inode_alloc()
665 pag->pagf_metadata = 0; in xfs_set_inode_alloc()
668 xfs_perag_put(pag); in xfs_set_inode_alloc()
Dxfs_reflink.c1075 struct xfs_perag *pag; in xfs_reflink_ag_has_free_space() local
1081 pag = xfs_perag_get(mp, agno); in xfs_reflink_ag_has_free_space()
1082 if (xfs_ag_resv_critical(pag, XFS_AG_RESV_AGFL) || in xfs_reflink_ag_has_free_space()
1083 xfs_ag_resv_critical(pag, XFS_AG_RESV_METADATA)) in xfs_reflink_ag_has_free_space()
1085 xfs_perag_put(pag); in xfs_reflink_ag_has_free_space()
Dxfs_inode.c2256 struct xfs_perag *pag; in xfs_ifree_cluster() local
2260 pag = xfs_perag_get(mp, XFS_INO_TO_AGNO(mp, inum)); in xfs_ifree_cluster()
2341 ip = radix_tree_lookup(&pag->pag_ici_root, in xfs_ifree_cluster()
2428 xfs_perag_put(pag); in xfs_ifree_cluster()
3245 struct xfs_perag *pag; in xfs_iflush_cluster() local
3256 pag = xfs_perag_get(mp, XFS_INO_TO_AGNO(mp, ip->i_ino)); in xfs_iflush_cluster()
3268 nr_found = radix_tree_gang_lookup(&pag->pag_ici_root, (void**)cilist, in xfs_iflush_cluster()
3367 xfs_perag_put(pag); in xfs_iflush_cluster()
3410 xfs_perag_put(pag); in xfs_iflush_cluster()
Dxfs_trace.h2624 TP_PROTO(struct xfs_perag *pag, enum xfs_ag_resv_type resv,
2626 TP_ARGS(pag, resv, len),
2638 struct xfs_ag_resv *r = xfs_perag_resv(pag, resv);
2640 __entry->dev = pag->pag_mount->m_super->s_dev;
2641 __entry->agno = pag->pag_agno;
2643 __entry->freeblks = pag->pagf_freeblks;
2644 __entry->flcount = pag->pagf_flcount;
2661 TP_PROTO(struct xfs_perag *pag, enum xfs_ag_resv_type type, \
2663 TP_ARGS(pag, type, len))