Home
last modified time | relevance | path

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

123

/linux/fs/xfs/libxfs/
H A Dxfs_ag.h100 static inline struct xfs_group *pag_group(struct xfs_perag *pag) in pag_group() argument
102 return &pag->pag_group; in pag_group()
105 static inline struct xfs_mount *pag_mount(const struct xfs_perag *pag) in pag_mount() argument
107 return pag->pag_group.xg_mount; in pag_mount()
110 static inline xfs_agnumber_t pag_agno(const struct xfs_perag *pag) in pag_agno() argument
112 return pag->pag_group.xg_gno; in pag_agno()
125 static inline bool xfs_perag_ ## name (struct xfs_perag *pag) \
127 return test_bit(XFS_AGSTATE_ ## NAME, &pag->pag_opstate); \
155 struct xfs_perag *pag) in xfs_perag_hold() argument
157 return to_perag(xfs_group_hold(pag_group(pag))); in xfs_perag_hold()
[all …]
H A Dxfs_ag.c49 struct xfs_perag *pag; in xfs_initialize_perag_data() local
64 pag = xfs_perag_get(mp, index); in xfs_initialize_perag_data()
65 error = xfs_alloc_read_agf(pag, NULL, 0, NULL); in xfs_initialize_perag_data()
67 error = xfs_ialloc_read_agi(pag, NULL, 0, NULL); in xfs_initialize_perag_data()
69 xfs_perag_put(pag); in xfs_initialize_perag_data()
73 ifree += pag->pagi_freecount; in xfs_initialize_perag_data()
74 ialloc += pag->pagi_count; in xfs_initialize_perag_data()
75 bfree += pag->pagf_freeblks; in xfs_initialize_perag_data()
76 bfreelst += pag->pagf_flcount; in xfs_initialize_perag_data()
77 btree += pag->pagf_btreeblks; in xfs_initialize_perag_data()
[all …]
H A Dxfs_ialloc.c114 struct xfs_perag *pag, in xfs_inobt_check_irec() argument
118 if (!xfs_verify_agino(pag, irec->ir_startino)) in xfs_inobt_check_irec()
120 if (!xfs_verify_agino(pag, in xfs_inobt_check_irec()
204 struct xfs_perag *pag, in xfs_inobt_insert() argument
217 cur = xfs_finobt_init_cursor(pag, tp, agbp); in xfs_inobt_insert()
219 cur = xfs_inobt_init_cursor(pag, tp, agbp); in xfs_inobt_insert()
551 struct xfs_perag *pag, in xfs_inobt_insert_sprec() argument
556 struct xfs_mount *mp = pag_mount(pag); in xfs_inobt_insert_sprec()
562 cur = xfs_inobt_init_cursor(pag, tp, agbp); in xfs_inobt_insert_sprec()
611 trace_xfs_irec_merge_pre(pag, &rec, nrec); in xfs_inobt_insert_sprec()
[all …]
H A Dxfs_ag_resv.h9 void xfs_ag_resv_free(struct xfs_perag *pag);
10 int xfs_ag_resv_init(struct xfs_perag *pag, struct xfs_trans *tp);
12 bool xfs_ag_resv_critical(struct xfs_perag *pag, enum xfs_ag_resv_type type);
13 xfs_extlen_t xfs_ag_resv_needed(struct xfs_perag *pag,
16 void xfs_ag_resv_alloc_extent(struct xfs_perag *pag, enum xfs_ag_resv_type type,
18 void xfs_ag_resv_free_extent(struct xfs_perag *pag, enum xfs_ag_resv_type type,
23 struct xfs_perag *pag, in xfs_perag_resv() argument
28 return &pag->pag_meta_resv; in xfs_perag_resv()
30 return &pag->pag_rmapbt_resv; in xfs_perag_resv()
H A Dxfs_alloc.h38 struct xfs_perag *pag; /* per-ag struct for this agno */ member
72 xfs_extlen_t xfs_alloc_longest_free_extent(struct xfs_perag *pag,
75 struct xfs_perag *pag);
76 int xfs_alloc_get_freelist(struct xfs_perag *pag, struct xfs_trans *tp,
78 int xfs_alloc_put_freelist(struct xfs_perag *pag, struct xfs_trans *tp,
146 struct xfs_perag *pag,
156 struct xfs_perag *pag, in xfs_free_extent() argument
162 return __xfs_free_extent(tp, pag, agbno, len, oinfo, type, false); in xfs_free_extent()
189 xfs_failaddr_t xfs_alloc_check_irec(struct xfs_perag *pag,
192 int xfs_read_agf(struct xfs_perag *pag, struct xfs_trans *tp, int flags,
[all …]
H A Dxfs_ialloc.h45 int xfs_difree(struct xfs_trans *tp, struct xfs_perag *pag,
53 struct xfs_perag *pag,
68 int xfs_read_agi(struct xfs_perag *pag, struct xfs_trans *tp, xfs_buf_flags_t flags,
70 int xfs_ialloc_read_agi(struct xfs_perag *pag, struct xfs_trans *tp,
100 xfs_failaddr_t xfs_inobt_check_irec(struct xfs_perag *pag,
115 int xfs_ialloc_check_shrink(struct xfs_perag *pag, struct xfs_trans *tp,
H A Dxfs_rmap_btree.h47 struct xfs_perag *pag);
60 struct xfs_perag *pag, xfs_extlen_t *ask, xfs_extlen_t *used);
67 struct xfs_btree_cur *xfs_rmapbt_mem_cursor(struct xfs_perag *pag,
H A Dxfs_inode_util.h53 int xfs_inode_uninit(struct xfs_trans *tp, struct xfs_perag *pag,
57 int xfs_iunlink_remove(struct xfs_trans *tp, struct xfs_perag *pag,
H A Dxfs_refcount_btree.h50 struct xfs_perag *pag);
61 struct xfs_trans *tp, struct xfs_perag *pag, xfs_extlen_t *ask,
/linux/fs/xfs/
H A Dxfs_filestream.c26 struct xfs_perag *pag; /* AG in use for this directory */ member
41 struct xfs_perag *pag = item->pag; in xfs_fstrm_free_func() local
43 trace_xfs_filestream_free(pag, mru->key); in xfs_fstrm_free_func()
44 atomic_dec(&pag->pagf_fstrms); in xfs_fstrm_free_func()
45 xfs_perag_rele(pag); in xfs_fstrm_free_func()
64 struct xfs_perag *pag; in xfs_filestream_pick_ag() local
75 for_each_perag_wrap(mp, start_agno, agno, pag) { in xfs_filestream_pick_ag()
78 trace_xfs_filestream_scan(pag, pino); in xfs_filestream_pick_ag()
81 err = xfs_bmap_longest_free_extent(pag, NULL, longest); in xfs_filestream_pick_ag()
88 xfs_perag_rele(pag); in xfs_filestream_pick_ag()
[all …]
H A Dxfs_iwalk.c56 struct xfs_perag *pag; member
99 struct xfs_perag *pag, in xfs_iwalk_ichunk_ra() argument
116 xfs_agbno_to_daddr(pag, agbno), in xfs_iwalk_ichunk_ra()
178 struct xfs_perag *pag = iwag->pag; in xfs_iwalk_ag_recs() local
185 trace_xfs_iwalk_ag_rec(pag, irec); in xfs_iwalk_ag_recs()
191 error = iwag->inobt_walk_fn(mp, tp, pag_agno(pag), irec, in xfs_iwalk_ag_recs()
210 xfs_agino_to_ino(pag, in xfs_iwalk_ag_recs()
264 struct xfs_perag *pag = iwag->pag; in xfs_iwalk_ag_start() local
270 error = xfs_ialloc_read_agi(pag, tp, 0, agi_bpp); in xfs_iwalk_ag_start()
273 *curpp = xfs_inobt_init_cursor(pag, tp, *agi_bpp); in xfs_iwalk_ag_start()
[all …]
H A Dxfs_discard.c162 struct xfs_perag *pag, in xfs_trim_gather_extents() argument
166 struct xfs_mount *mp = pag_mount(pag); in xfs_trim_gather_extents()
183 error = xfs_alloc_read_agf(pag, tp, 0, &agbp); in xfs_trim_gather_extents()
193 tcur->count = pag->pagf_longest; in xfs_trim_gather_extents()
197 cur = xfs_bnobt_init_cursor(mp, tp, agbp, pag); in xfs_trim_gather_extents()
203 cur = xfs_cntbt_init_cursor(mp, tp, agbp, pag); in xfs_trim_gather_extents()
207 cur = xfs_cntbt_init_cursor(mp, tp, agbp, pag); in xfs_trim_gather_extents()
251 trace_xfs_discard_exclude(pag_group(pag), fbno, flen); in xfs_trim_gather_extents()
255 trace_xfs_discard_exclude(pag_group(pag), fbno, flen); in xfs_trim_gather_extents()
273 trace_xfs_discard_toosmall(pag_group(pag), fbno, flen); in xfs_trim_gather_extents()
[all …]
H A Dxfs_buf.c491 struct xfs_perag *pag, in xfs_buf_find_insert() argument
507 new_bp->b_pag = pag; in xfs_buf_find_insert()
535 if (pag) in xfs_buf_find_insert()
536 xfs_perag_put(pag); in xfs_buf_find_insert()
555 struct xfs_perag *pag) in xfs_buftarg_buf_cache() argument
557 if (pag) in xfs_buftarg_buf_cache()
558 return &pag->pag_bcache; in xfs_buftarg_buf_cache()
576 struct xfs_perag *pag; in xfs_buf_get_map() local
591 pag = xfs_buftarg_get_pag(btp, &cmap); in xfs_buf_get_map()
592 bch = xfs_buftarg_buf_cache(btp, pag); in xfs_buf_get_map()
[all …]
H A Dxfs_iunlink_item.h17 struct xfs_perag *pag; member
25 struct xfs_perag *pag, xfs_agino_t next_agino);
/linux/fs/xfs/scrub/
H A Dagheader_repair.c120 if (!xfs_verify_agbno(sc->sa.pag, agbno)) in xrep_agf_check_agfl_block()
144 return xfs_verify_agbno(sc->sa.pag, fab->root) && in xrep_check_btree_root()
204 struct xfs_perag *pag = sc->sa.pag; in xrep_agf_init_header() local
211 agf->agf_seqno = cpu_to_be32(pag_agno(pag)); in xrep_agf_init_header()
212 agf->agf_length = cpu_to_be32(pag_group(pag)->xg_block_count); in xrep_agf_init_header()
220 ASSERT(xfs_perag_initialised_agf(pag)); in xrep_agf_init_header()
221 clear_bit(XFS_AGSTATE_AGF_INIT, &pag->pag_opstate); in xrep_agf_init_header()
263 cur = xfs_bnobt_init_cursor(mp, sc->tp, agf_bp, sc->sa.pag); in xrep_agf_calc_from_btrees()
276 cur = xfs_cntbt_init_cursor(mp, sc->tp, agf_bp, sc->sa.pag); in xrep_agf_calc_from_btrees()
284 cur = xfs_rmapbt_init_cursor(mp, sc->tp, agf_bp, sc->sa.pag); in xrep_agf_calc_from_btrees()
[all …]
H A Dfscounters.c77 struct xfs_perag *pag = NULL; in xchk_fscount_warmup() local
80 while ((pag = xfs_perag_next(mp, pag))) { in xchk_fscount_warmup()
83 if (xfs_perag_initialised_agi(pag) && in xchk_fscount_warmup()
84 xfs_perag_initialised_agf(pag)) in xchk_fscount_warmup()
88 error = xfs_ialloc_read_agi(pag, sc->tp, 0, &agi_bp); in xchk_fscount_warmup()
91 error = xfs_alloc_read_agf(pag, sc->tp, 0, &agf_bp); in xchk_fscount_warmup()
99 if (!xfs_perag_initialised_agi(pag) || in xchk_fscount_warmup()
100 !xfs_perag_initialised_agf(pag)) { in xchk_fscount_warmup()
115 if (pag) in xchk_fscount_warmup()
116 xfs_perag_rele(pag); in xchk_fscount_warmup()
[all …]
H A Dnewbt.c71 free = sc->sa.pag->pagf_freeblks; in xrep_newbt_estimate_slack()
72 sz = xfs_ag_block_count(sc->mp, pag_agno(sc->sa.pag)); in xrep_newbt_estimate_slack()
191 struct xfs_perag *pag, in xrep_newbt_add_blocks() argument
206 resv->pag = xfs_perag_hold(pag); in xrep_newbt_add_blocks()
220 xfs_perag_put(resv->pag); in xrep_newbt_add_blocks()
233 struct xfs_perag *pag, in xrep_newbt_add_extent() argument
240 .fsbno = xfs_agbno_to_fsb(pag, agbno), in xrep_newbt_add_extent()
245 return xrep_newbt_add_blocks(xnr, pag, &args); in xrep_newbt_add_extent()
256 if (agno == pag_agno(sc->sa.pag) && in xrep_newbt_validate_ag_alloc_hint()
261 xfs_agbno_to_fsb(sc->sa.pag, XFS_AGFL_BLOCK(sc->mp) + 1); in xrep_newbt_validate_ag_alloc_hint()
[all …]
H A Dalloc_repair.c135 struct xfs_group *xg = pag_group(sc->sa.pag); in xrep_setup_ag_allocbt()
156 if (xfs_alloc_check_irec(sc->sa.pag, rec) != NULL) in xrep_abt_check_free_ext()
212 trace_xrep_abt_found(sc->sa.pag, &arec); in xrep_abt_stash()
392 error = xfs_alloc_read_agfl(sc->sa.pag, sc->tp, &agfl_bp); in xrep_abt_find_freespace()
486 trace_xrep_newbt_alloc_ag_blocks(sc->sa.pag, arec.ar_startblock, in xrep_abt_reserve_space()
489 error = xrep_newbt_add_extent(&ra->new_bnobt, sc->sa.pag, in xrep_abt_reserve_space()
536 struct xfs_perag *pag = sc->sa.pag; in xrep_abt_dispose_one() local
541 ASSERT(pag == resv->pag); in xrep_abt_dispose_one()
546 xfs_agbno_to_fsb(pag, resv->agbno), resv->used, in xrep_abt_dispose_one()
557 trace_xrep_newbt_free_blocks(resv->pag, free_agbno, free_aglen, in xrep_abt_dispose_one()
[all …]
H A Drefcount_repair.c138 if (xfs_refcount_check_irec(sc->sa.pag, rec) != NULL) in xrep_refc_check_ext()
186 trace_xrep_refc_found(pag_group(sc->sa.pag), &irec); in xrep_refc_stash()
556 struct xfs_perag *pag = sc->sa.pag; in xrep_refc_reset_counters() local
569 pag->pagf_repair_refcount_level = pag->pagf_refcount_level; in xrep_refc_reset_counters()
586 struct xfs_perag *pag = sc->sa.pag; in xrep_refc_build_new_tree() local
600 xfs_agbno_to_fsb(pag, xfs_refc_block(sc->mp)), in xrep_refc_build_new_tree()
606 refc_cur = xfs_refcountbt_init_cursor(sc->mp, NULL, NULL, pag); in xrep_refc_build_new_tree()
630 pag->pagf_repair_refcount_level = rr->new_btree.bload.btree_height; in xrep_refc_build_new_tree()
658 pag->pagf_repair_refcount_level = 0; in xrep_refc_build_new_tree()
675 struct xfs_perag *pag = sc->sa.pag; in xrep_refc_remove_old_tree() local
[all …]
H A Drmap_repair.c193 if (xfs_rmap_check_irec(sc->sa.pag, rec) != NULL) in xrep_rmap_check_mapping()
234 trace_xrep_rmap_found(sc->sa.pag, &rmap); in xrep_rmap_stash()
237 mcur = xfs_rmapbt_mem_cursor(sc->sa.pag, sc->tp, &rr->rmap_btree); in xrep_rmap_stash()
347 pag_agno(rf->rr->sc->sa.pag)) in xrep_rmap_visit_bmbt()
394 if (XFS_FSB_TO_AGNO(cur->bc_mp, fsbno) != pag_agno(rf->rr->sc->sa.pag)) in xrep_rmap_visit_iroot_btree_block()
870 if (!xfs_ag_contains_log(sc->mp, pag_agno(sc->sa.pag))) in xrep_rmap_find_log_rmaps()
993 mcur = xfs_rmapbt_mem_cursor(rr->sc->sa.pag, NULL, &rr->rmap_btree); in xrep_rmap_find_rmaps()
995 sc->sa.pag); in xrep_rmap_find_rmaps()
1043 .agno = pag_agno(rr->sc->sa.pag), in xrep_rmap_try_reserve()
1080 sc->sa.pag); in xrep_rmap_try_reserve()
[all …]
H A Dagheader.c105 struct xfs_perag *pag; in xchk_superblock() local
122 pag = xfs_perag_get(mp, agno); in xchk_superblock()
123 if (!pag) in xchk_superblock()
426 xfs_perag_put(pag); in xchk_superblock()
601 struct xfs_perag *pag; in xchk_agf() local
618 pag = sc->sa.pag; in xchk_agf()
622 if (eoag != pag_group(pag)->xg_block_count) in xchk_agf()
627 if (!xfs_verify_agbno(pag, agbno)) in xchk_agf()
631 if (!xfs_verify_agbno(pag, agbno)) in xchk_agf()
644 if (!xfs_verify_agbno(pag, agbno)) in xchk_agf()
[all …]
H A Dialloc_repair.c166 be64_to_cpu(dip->di_ino) != xfs_agino_to_ino(ri->sc->sa.pag, agino)) in xrep_ibt_check_ifree()
189 if (xfs_inobt_check_irec(ri->sc->sa.pag, &ri->rie) != NULL) in xrep_ibt_stash()
195 trace_xrep_ibt_found(ri->sc->sa.pag, &ri->rie); in xrep_ibt_stash()
308 imap.im_blkno = xfs_agbno_to_daddr(sc->sa.pag, cluster_bno); in xrep_ibt_process_cluster()
349 if (!xfs_verify_agbext(sc->sa.pag, agbno, len)) in xrep_ibt_check_inode_ext()
377 if (!xfs_verify_agino(sc->sa.pag, agino)) in xrep_ibt_check_inode_ext()
381 if (!xfs_verify_agino(sc->sa.pag, agino)) in xrep_ibt_check_inode_ext()
400 if (!xfs_verify_agbext(ri->sc->sa.pag, rec->rm_startblock, in xrep_ibt_record_old_btree_blocks()
424 trace_xrep_ibt_walk_rmap(ri->sc->sa.pag, rec); in xrep_ibt_record_inode_blocks()
655 xfs_agbno_to_fsb(sc->sa.pag, XFS_IBT_BLOCK(sc->mp)), in xrep_ibt_build_new_trees()
[all …]
H A Dtrace.h787 TP_PROTO(const struct xfs_perag *pag, xfs_agino_t startino,
792 TP_ARGS(pag, startino, map_daddr, map_len, chunk_ino, nr_inodes,
807 __entry->dev = pag_mount(pag)->m_super->s_dev;
808 __entry->agno = pag_agno(pag);
937 TP_PROTO(const struct xfs_perag *pag,
940 TP_ARGS(pag, irec, seen),
951 __entry->dev = pag_mount(pag)->m_super->s_dev;
952 __entry->agno = pag_agno(pag);
2086 TP_PROTO(const struct xfs_perag *pag, const struct xfs_rmap_irec *rec),
2087 TP_ARGS(pag, rec),
[all …]
H A Drtrefcount_repair.c418 struct xfs_perag *pag) in xrep_rtrefc_scan_ag() argument
423 error = xrep_ag_init(sc, pag, &sc->sa); in xrep_rtrefc_scan_ag()
439 struct xfs_perag *pag = NULL; in xrep_rtrefc_find_refcounts() local
448 while ((pag = xfs_perag_next(sc->mp, pag))) { in xrep_rtrefc_find_refcounts()
449 error = xrep_rtrefc_scan_ag(rr, pag); in xrep_rtrefc_find_refcounts()
451 xfs_perag_rele(pag); in xrep_rtrefc_find_refcounts()
/linux/drivers/net/ethernet/mscc/
H A Docelot_flower.c22 #define VCAP_IS2_CHAIN(lookup, pag) \ argument
23 (2 * VCAP_BLOCK + (lookup) * VCAP_LOOKUP + (pag))
30 int lookup, pag; in ocelot_chain_to_block() local
49 for (pag = 0; pag < VCAP_IS2_NUM_PAG; pag++) in ocelot_chain_to_block()
50 if (chain == VCAP_IS2_CHAIN(lookup, pag)) in ocelot_chain_to_block()
95 int pag; in ocelot_is_goto_target_valid() local
122 for (pag = 0; pag < VCAP_IS2_NUM_PAG; pag++) in ocelot_is_goto_target_valid()
123 if (goto_target == VCAP_IS2_CHAIN(0, pag)) in ocelot_is_goto_target_valid()
132 for (pag = 0; pag < VCAP_IS2_NUM_PAG; pag++) in ocelot_is_goto_target_valid()
133 if (chain == VCAP_IS2_CHAIN(0, pag)) in ocelot_is_goto_target_valid()
[all …]

123