| /linux/fs/xfs/libxfs/ |
| H A D | xfs_ag_resv.h | 9 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 D | xfs_alloc.h | 38 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 D | xfs_ialloc.h | 45 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 D | xfs_rmap_btree.h | 47 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 D | xfs_inode_util.h | 53 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 D | xfs_refcount_btree.h | 50 struct xfs_perag *pag); 61 struct xfs_trans *tp, struct xfs_perag *pag, xfs_extlen_t *ask,
|
| H A D | xfs_alloc_btree.h | 52 struct xfs_perag *pag); 55 struct xfs_perag *pag);
|
| H A D | xfs_ialloc_btree.h | 49 struct xfs_btree_cur *xfs_inobt_init_cursor(struct xfs_perag *pag, 51 struct xfs_btree_cur *xfs_finobt_init_cursor(struct xfs_perag *pag,
|
| /linux/fs/xfs/ |
| H A D | xfs_iwalk.c | 56 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 D | xfs_discard.c | 162 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 D | xfs_inode.c | 1347 struct xfs_perag *pag; in xfs_inactive_health() local 1360 pag = xfs_perag_get(mp, XFS_INODE_TO_AGNO(ip)); in xfs_inactive_health() 1361 if (!pag) { in xfs_inactive_health() 1367 xfs_ag_mark_sick(pag, XFS_SICK_AG_INODES); in xfs_inactive_health() 1368 xfs_perag_put(pag); in xfs_inactive_health() 1512 struct xfs_perag *pag, in xfs_iunlink_lookup() argument 1518 ip = radix_tree_lookup(&pag->pag_ici_root, agino); in xfs_iunlink_lookup() 1550 struct xfs_perag *pag = agibp->b_pag; in xfs_iunlink_reload_next() local 1551 struct xfs_mount *mp = pag_mount(pag); in xfs_iunlink_reload_next() 1559 next_ip = radix_tree_lookup(&pag->pag_ici_root, next_agino); in xfs_iunlink_reload_next() [all …]
|
| H A D | xfs_health.c | 50 struct xfs_perag *pag = NULL; in xfs_health_unmount() local 60 while ((pag = xfs_perag_next(mp, pag))) in xfs_health_unmount() 61 xfs_health_unmount_group(pag_group(pag), &warn); in xfs_health_unmount() 193 struct xfs_perag *pag = xfs_perag_get(mp, agno); in xfs_agno_mark_sick() local 196 if (!pag) in xfs_agno_mark_sick() 199 xfs_ag_mark_sick(pag, mask); in xfs_agno_mark_sick() 200 xfs_perag_put(pag); in xfs_agno_mark_sick() 533 struct xfs_perag *pag, in xfs_ag_geom_health() argument 543 xfs_group_measure_sickness(pag_group(pag), &sick, &checked); in xfs_ag_geom_health()
|
| H A D | xfs_iunlink_item.h | 17 struct xfs_perag *pag; member 25 struct xfs_perag *pag, xfs_agino_t next_agino);
|
| H A D | xfs_reflink.c | 145 struct xfs_perag *pag; in xfs_reflink_find_shared() local 150 pag = xfs_perag_get(mp, XFS_FSB_TO_AGNO(mp, irec->br_startblock)); in xfs_reflink_find_shared() 153 error = xfs_alloc_read_agf(pag, tp, 0, &agbp); in xfs_reflink_find_shared() 157 cur = xfs_refcountbt_init_cursor(mp, tp, agbp, pag); in xfs_reflink_find_shared() 166 xfs_perag_put(pag); in xfs_reflink_find_shared() 1105 struct xfs_perag *pag = NULL; in xfs_reflink_recover_cow() local 1112 while ((pag = xfs_perag_next(mp, pag))) { in xfs_reflink_recover_cow() 1113 error = xfs_refcount_recover_cow_leftovers(pag_group(pag)); in xfs_reflink_recover_cow() 1115 xfs_perag_rele(pag); in xfs_reflink_recover_cow() 1323 struct xfs_perag *pag; in xfs_reflink_ag_has_free_space() local [all …]
|
| H A D | xfs_fsmap.c | 478 struct xfs_perag *pag = NULL; in __xfs_getfsmap_datadev() local 530 while ((pag = xfs_perag_next_range(mp, pag, start_ag, end_ag))) { in __xfs_getfsmap_datadev() 535 info->group = pag_group(pag); in __xfs_getfsmap_datadev() 536 if (pag_agno(pag) == end_ag) { in __xfs_getfsmap_datadev() 554 error = xfs_alloc_read_agf(pag, tp, 0, &info->agf_bp); in __xfs_getfsmap_datadev() 558 trace_xfs_fsmap_low_group_key(mp, info->dev, pag_agno(pag), in __xfs_getfsmap_datadev() 560 trace_xfs_fsmap_high_group_key(mp, info->dev, pag_agno(pag), in __xfs_getfsmap_datadev() 571 if (pag_agno(pag) == start_ag) in __xfs_getfsmap_datadev() 579 if (pag_agno(pag) == end_ag) { in __xfs_getfsmap_datadev() 596 xfs_perag_rele(pag); in __xfs_getfsmap_datadev() [all …]
|
| H A D | xfs_verify_media.c | 121 struct xfs_perag *pag = to_perag(xg); in xfs_verify_report_losses() local 123 error = xfs_alloc_read_agf(pag, tp, 0, &agf_bp); in xfs_verify_report_losses() 125 xfs_perag_rele(pag); in xfs_verify_report_losses() 129 cur = xfs_rmapbt_init_cursor(mp, tp, agf_bp, pag); in xfs_verify_report_losses()
|
| /linux/fs/xfs/scrub/ |
| H A D | agheader_repair.c | 120 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 D | fscounters.c | 77 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 D | alloc_repair.c | 135 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 D | refcount_repair.c | 138 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 D | agheader.c | 107 struct xfs_perag *pag; in xchk_superblock() local 124 pag = xfs_perag_get(mp, agno); in xchk_superblock() 125 if (!pag) in xchk_superblock() 428 xfs_perag_put(pag); in xchk_superblock() 603 struct xfs_perag *pag; in xchk_agf() local 620 pag = sc->sa.pag; in xchk_agf() 624 if (eoag != pag_group(pag)->xg_block_count) in xchk_agf() 629 if (!xfs_verify_agbno(pag, agbno)) in xchk_agf() 633 if (!xfs_verify_agbno(pag, agbno)) in xchk_agf() 646 if (!xfs_verify_agbno(pag, agbno)) in xchk_agf() [all …]
|
| H A D | trace.h | 787 TP_PROTO(const struct xfs_perag *pag, xfs_agino_t startino, 792 TP_ARGS(pag, startino, map_agblock, 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); 2078 TP_PROTO(const struct xfs_perag *pag, const struct xfs_rmap_irec *rec), 2079 TP_ARGS(pag, rec), [all …]
|
| H A D | nlinks_repair.c | 75 struct xfs_perag *pag; in xrep_nlinks_iunlink_remove() local 78 pag = xfs_perag_get(sc->mp, XFS_INODE_TO_AGNO(sc->ip)); in xrep_nlinks_iunlink_remove() 79 error = xfs_iunlink_remove(sc->tp, pag, sc->ip); in xrep_nlinks_iunlink_remove() 80 xfs_perag_put(pag); in xrep_nlinks_iunlink_remove()
|
| H A D | newbt.h | 15 struct xfs_perag *pag; member 68 int xrep_newbt_add_extent(struct xrep_newbt *xnr, struct xfs_perag *pag,
|
| H A D | rmap.c | 413 if (xfs_ag_contains_log(mp, pag_agno(sc->sa.pag))) { in xchk_rmapbt_walk_ag_metadata() 425 sc->sa.pag); in xchk_rmapbt_walk_ag_metadata() 435 sc->sa.pag); in xchk_rmapbt_walk_ag_metadata() 446 error = xfs_alloc_read_agfl(sc->sa.pag, sc->tp, &agfl_bp); in xchk_rmapbt_walk_ag_metadata() 459 cur = xfs_inobt_init_cursor(sc->sa.pag, sc->tp, sc->sa.agi_bp); in xchk_rmapbt_walk_ag_metadata() 469 cur = xfs_finobt_init_cursor(sc->sa.pag, sc->tp, in xchk_rmapbt_walk_ag_metadata() 483 sc->sa.agf_bp, sc->sa.pag); in xchk_rmapbt_walk_ag_metadata()
|