Home
last modified time | relevance | path

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

12

/linux/fs/xfs/libxfs/
H A Dxfs_rtgroup.h72 static inline struct xfs_group *rtg_group(struct xfs_rtgroup *rtg) in rtg_group() argument
74 return &rtg->rtg_group; in rtg_group()
77 static inline struct xfs_mount *rtg_mount(const struct xfs_rtgroup *rtg) in rtg_mount() argument
79 return rtg->rtg_group.xg_mount; in rtg_mount()
82 static inline xfs_rgnumber_t rtg_rgno(const struct xfs_rtgroup *rtg) in rtg_rgno() argument
84 return rtg->rtg_group.xg_gno; in rtg_rgno()
87 static inline xfs_rgblock_t rtg_blocks(const struct xfs_rtgroup *rtg) in rtg_blocks() argument
89 return rtg->rtg_group.xg_block_count; in rtg_blocks()
92 static inline struct xfs_inode *rtg_bitmap(const struct xfs_rtgroup *rtg) in rtg_bitmap() argument
94 return rtg->rtg_inodes[XFS_RTGI_BITMAP]; in rtg_bitmap()
[all …]
H A Dxfs_rtbitmap.h12 struct xfs_rtgroup *rtg; member
25 struct xfs_rtgroup *rtg, in xfs_rtx_to_rtb() argument
28 struct xfs_mount *mp = rtg_mount(rtg); in xfs_rtx_to_rtb()
29 xfs_rtblock_t start = xfs_group_start_fsb(rtg_group(rtg)); in xfs_rtx_to_rtb()
245 return be32_to_cpu(word->rtg); in xfs_rtbitmap_getword()
259 word->rtg = cpu_to_be32(value); in xfs_rtbitmap_setword()
335 return be32_to_cpu(info->rtg); in xfs_suminfo_get()
349 be32_add_cpu(&info->rtg, delta); in xfs_suminfo_add()
350 return be32_to_cpu(info->rtg); in xfs_suminfo_add()
379 struct xfs_rtgroup *rtg,
[all …]
H A Dxfs_rtrmap_btree.h20 struct xfs_rtgroup *rtg);
22 struct xfs_rtgroup *rtg, struct xfs_inode *ip,
197 int xfs_rtrmapbt_create(struct xfs_rtgroup *rtg, struct xfs_inode *ip,
199 int xfs_rtrmapbt_init_rtsb(struct xfs_mount *mp, struct xfs_rtgroup *rtg,
205 struct xfs_btree_cur *xfs_rtrmapbt_mem_cursor(struct xfs_rtgroup *rtg,
210 xfs_rgblock_t xfs_rtrmap_highest_rgbno(struct xfs_rtgroup *rtg);
H A Dxfs_metafile.c265 struct xfs_rtgroup *rtg = NULL; in xfs_metafile_resv_init() local
285 while ((rtg = xfs_rtgroup_next(mp, rtg))) { in xfs_metafile_resv_init()
287 used += rtg_rmap(rtg)->i_nblocks; in xfs_metafile_resv_init()
291 used += rtg_refcount(rtg)->i_nblocks; in xfs_metafile_resv_init()
H A Dxfs_rtrefcount_btree.h19 struct xfs_rtgroup *rtg);
21 struct xfs_rtgroup *rtg, struct xfs_inode *ip,
186 int xfs_rtrefcountbt_create(struct xfs_rtgroup *rtg, struct xfs_inode *ip,
H A Dxfs_rtrefcount_btree.c403 struct xfs_rtgroup *rtg) in xfs_rtrefcountbt_init_cursor() argument
405 struct xfs_inode *ip = rtg_refcount(rtg); in xfs_rtrefcountbt_init_cursor()
406 struct xfs_mount *mp = rtg_mount(rtg); in xfs_rtrefcountbt_init_cursor()
417 cur->bc_group = xfs_group_hold(rtg_group(rtg)); in xfs_rtrefcountbt_init_cursor()
736 struct xfs_rtgroup *rtg, in xfs_rtrefcountbt_create() argument
/linux/fs/xfs/
H A Dxfs_rtalloc.c50 uint8_t *rsum_cache = args->rtg->rtg_rsum_cache; in xfs_rtany_summary()
163 error = xfs_rtfind_forw(args, end, args->rtg->rtg_extents - 1, in xfs_rtallocate_range()
225 struct xfs_rtgroup *rtg, in xfs_rtallocate_clamp_len() argument
232 ret = min(rtg->rtg_extents, startrtx + rtxlen) - startrtx; in xfs_rtallocate_clamp_len()
267 end = min(args->rtg->rtg_extents, xfs_rbmblock_to_rtx(mp, bbno + 1)) - in xfs_rtallocate_extent_block()
271 scanlen = xfs_rtallocate_clamp_len(args->rtg, i, maxlen, prod); in xfs_rtallocate_extent_block()
366 scanlen = xfs_rtallocate_clamp_len(args->rtg, start, maxlen, prod); in xfs_rtallocate_extent_exact()
430 start = min(start, args->rtg->rtg_extents - 1); in xfs_rtallocate_extent_near()
664 struct xfs_rtgroup *rtg) in xfs_rtunmount_rtg() argument
669 xfs_rtginode_irele(&rtg->rtg_inodes[i]); in xfs_rtunmount_rtg()
[all …]
H A Dxfs_zone_alloc.c79 struct xfs_rtgroup *rtg, in xfs_zone_account_reclaimable() argument
82 struct xfs_group *xg = rtg_group(rtg); in xfs_zone_account_reclaimable()
83 struct xfs_mount *mp = rtg_mount(rtg); in xfs_zone_account_reclaimable()
85 uint32_t used = rtg_rmap(rtg)->i_used_blocks; in xfs_zone_account_reclaimable()
86 xfs_rgnumber_t rgno = rtg_rgno(rtg); in xfs_zone_account_reclaimable()
89 bool was_full = (used + freed == rtg_blocks(rtg)); in xfs_zone_account_reclaimable()
105 trace_xfs_zone_emptied(rtg); in xfs_zone_account_reclaimable()
168 struct xfs_rtgroup *rtg = oz->oz_rtg; in xfs_open_zone_mark_full() local
169 struct xfs_mount *mp = rtg_mount(rtg); in xfs_open_zone_mark_full()
171 uint32_t used = rtg_rmap(rtg)->i_used_blocks; in xfs_open_zone_mark_full()
[all …]
H A Dxfs_discard.c512 struct xfs_rtgroup *rtg, in xfs_trim_gather_rtextent() argument
531 rbno = xfs_rtx_to_rtb(rtg, rec->ar_startext); in xfs_trim_gather_rtextent()
532 rlen = xfs_rtbxlen_to_blen(rtg_mount(rtg), rec->ar_extcount); in xfs_trim_gather_rtextent()
536 trace_xfs_discard_rttoosmall(rtg_mount(rtg), rbno, rlen); in xfs_trim_gather_rtextent()
556 struct xfs_rtgroup *rtg, in xfs_trim_rtextents() argument
561 struct xfs_mount *mp = rtg_mount(rtg); in xfs_trim_rtextents()
577 xfs_rtgroup_lock(rtg, XFS_RTGLOCK_BITMAP_SHARED); in xfs_trim_rtextents()
578 error = xfs_rtalloc_query_range(rtg, tp, low, high, in xfs_trim_rtextents()
584 xfs_rtgroup_unlock(rtg, XFS_RTGLOCK_BITMAP_SHARED); in xfs_trim_rtextents()
590 xfs_rtgroup_unlock(rtg, XFS_RTGLOCK_BITMAP_SHARED); in xfs_trim_rtextents()
[all …]
H A Dxfs_zone_gc.c329 struct xfs_rtgroup *rtg = iter->victim_rtg; in xfs_zone_gc_query() local
336 ASSERT(iter->next_startblock <= rtg_blocks(rtg)); in xfs_zone_gc_query()
337 if (iter->next_startblock == rtg_blocks(rtg)) in xfs_zone_gc_query()
340 ASSERT(iter->next_startblock < rtg_blocks(rtg)); in xfs_zone_gc_query()
348 xfs_rtgroup_lock(rtg, XFS_RTGLOCK_RMAP); in xfs_zone_gc_query()
349 cur = xfs_rtrmapbt_init_cursor(tp, rtg); in xfs_zone_gc_query()
352 xfs_rtgroup_unlock(rtg, XFS_RTGLOCK_RMAP); in xfs_zone_gc_query()
374 iter->next_startblock = rtg_blocks(rtg); in xfs_zone_gc_query()
463 struct xfs_rtgroup *rtg = xfs_rtgroup_grab(mp, bit); in xfs_zone_gc_pick_victim_from() local
465 if (!rtg) in xfs_zone_gc_pick_victim_from()
[all …]
H A Dxfs_fsmap.c717 struct xfs_rtgroup *rtg, in xfs_getfsmap_rtdev_rtbitmap_helper() argument
725 struct xfs_mount *mp = rtg_mount(rtg); in xfs_getfsmap_rtdev_rtbitmap_helper()
728 xfs_rtx_to_rtb(rtg, rec->ar_startext); in xfs_getfsmap_rtdev_rtbitmap_helper()
761 struct xfs_rtgroup *rtg = NULL; in xfs_getfsmap_rtdev_rtbitmap() local
790 while ((rtg = xfs_rtgroup_next_range(mp, rtg, start_rgno, end_rgno))) { in xfs_getfsmap_rtdev_rtbitmap()
791 if (rtg_rgno(rtg) == end_rgno) in xfs_getfsmap_rtdev_rtbitmap()
795 info->group = rtg_group(rtg); in xfs_getfsmap_rtdev_rtbitmap()
796 xfs_rtgroup_lock(rtg, XFS_RTGLOCK_BITMAP_SHARED); in xfs_getfsmap_rtdev_rtbitmap()
797 error = xfs_rtalloc_query_range(rtg, tp, start_rtx, end_rtx, in xfs_getfsmap_rtdev_rtbitmap()
807 if (rtg_rgno(rtg) == end_rgno) { in xfs_getfsmap_rtdev_rtbitmap()
[all …]
H A Dxfs_health.c51 struct xfs_rtgroup *rtg = NULL; in xfs_health_unmount() local
64 while ((rtg = xfs_rtgroup_next(mp, rtg))) in xfs_health_unmount()
65 xfs_health_unmount_group(rtg_group(rtg), &warn); in xfs_health_unmount()
307 struct xfs_rtgroup *rtg = xfs_rtgroup_get(mp, rgno); in xfs_rgno_mark_sick() local
310 if (!rtg) in xfs_rgno_mark_sick()
313 xfs_group_mark_sick(rtg_group(rtg), mask); in xfs_rgno_mark_sick()
314 xfs_rtgroup_put(rtg); in xfs_rgno_mark_sick()
478 struct xfs_rtgroup *rtg = NULL; in xfs_fsop_geom_health() local
490 while ((rtg = xfs_rtgroup_next(mp, rtg))) { in xfs_fsop_geom_health()
491 xfs_group_measure_sickness(rtg_group(rtg), &sick, &checked); in xfs_fsop_geom_health()
[all …]
H A Dxfs_verify_media.c114 struct xfs_rtgroup *rtg = NULL; in xfs_verify_report_losses() local
131 rtg = to_rtg(xg); in xfs_verify_report_losses()
132 xfs_rtgroup_lock(rtg, XFS_RTGLOCK_RMAP); in xfs_verify_report_losses()
133 cur = xfs_rtrmapbt_init_cursor(tp, rtg); in xfs_verify_report_losses()
158 if (rtg) in xfs_verify_report_losses()
159 xfs_rtgroup_unlock(rtg, XFS_RTGLOCK_RMAP); in xfs_verify_report_losses()
H A Dxfs_notify_failure.c298 struct xfs_rtgroup *rtg = NULL; in xfs_dax_notify_dev_failure() local
313 rtg = to_rtg(xg); in xfs_dax_notify_dev_failure()
314 xfs_rtgroup_lock(rtg, XFS_RTGLOCK_RMAP); in xfs_dax_notify_dev_failure()
315 cur = xfs_rtrmapbt_init_cursor(tp, rtg); in xfs_dax_notify_dev_failure()
340 if (rtg) in xfs_dax_notify_dev_failure()
341 xfs_rtgroup_unlock(rtg, XFS_RTGLOCK_RMAP); in xfs_dax_notify_dev_failure()
H A Dxfs_reflink.c188 struct xfs_rtgroup *rtg; in xfs_reflink_find_rtshared() local
202 rtg = xfs_rtgroup_get(mp, xfs_rtb_to_rgno(mp, irec->br_startblock)); in xfs_reflink_find_rtshared()
204 xfs_rtgroup_lock(rtg, XFS_RTGLOCK_REFCOUNT); in xfs_reflink_find_rtshared()
205 cur = xfs_rtrefcountbt_init_cursor(tp, rtg); in xfs_reflink_find_rtshared()
209 xfs_rtgroup_unlock(rtg, XFS_RTGLOCK_REFCOUNT); in xfs_reflink_find_rtshared()
210 xfs_rtgroup_put(rtg); in xfs_reflink_find_rtshared()
1106 struct xfs_rtgroup *rtg = NULL; in xfs_reflink_recover_cow() local
1120 while ((rtg = xfs_rtgroup_next(mp, rtg))) { in xfs_reflink_recover_cow()
1121 error = xfs_refcount_recover_cow_leftovers(rtg_group(rtg)); in xfs_reflink_recover_cow()
1123 xfs_rtgroup_rele(rtg); in xfs_reflink_recover_cow()
H A Dxfs_drain.h70 void xfs_group_intent_put(struct xfs_group *rtg);
/linux/fs/xfs/scrub/
H A Drtbitmap.c65 error = xchk_install_live_inode(sc, rtg_bitmap(sc->sr.rtg)); in xchk_setup_rtbitmap()
121 struct xfs_rtgroup *rtg, in xchk_rtbitmap_rec() argument
131 startblock = xfs_rtx_to_rtb(rtg, rec->ar_startext); in xchk_rtbitmap_rec()
132 blockcount = xfs_rtxlen_to_extlen(rtg_mount(rtg), rec->ar_extcount); in xchk_rtbitmap_rec()
134 if (!xfs_verify_rtbext(rtg_mount(rtg), startblock, blockcount)) in xchk_rtbitmap_rec()
195 struct xfs_rtgroup *rtg = sc->sr.rtg; in xchk_rtbitmap() local
196 struct xfs_inode *rbmip = rtg_bitmap(rtg); in xchk_rtbitmap()
252 error = xfs_rtalloc_query_all(rtg, sc->tp, xchk_rtbitmap_rec, rtb); in xchk_rtbitmap()
261 last_rgbno = rtg->rtg_extents * mp->m_sb.sb_rextsize; in xchk_rtbitmap()
275 struct xfs_rtgroup *rtg = sc->sr.rtg; in xchk_xref_is_used_rt_space() local
[all …]
H A Drtsummary.c80 error = xchk_install_live_inode(sc, rtg_summary(sc->sr.rtg)); in xchk_setup_rtsummary()
153 be32_add_cpu(&v->rtg, 1); in xchk_rtsum_inc()
154 return be32_to_cpu(v->rtg); in xchk_rtsum_inc()
164 struct xfs_rtgroup *rtg, in xchk_rtsum_record_free() argument
169 struct xfs_mount *mp = rtg_mount(rtg); in xchk_rtsum_record_free()
188 rtbno = xfs_rtx_to_rtb(rtg, rec->ar_startext); in xchk_rtsum_record_free()
192 xchk_ip_xref_set_corrupt(sc, rtg_bitmap(rtg)); in xchk_rtsum_record_free()
214 struct xfs_rtgroup *rtg = sc->sr.rtg; in xchk_rtsum_compute() local
218 rtg_bitmap(rtg)->i_disk_size) in xchk_rtsum_compute()
221 return xfs_rtalloc_query_all(rtg, sc->tp, xchk_rtsum_record_free, sc); in xchk_rtsum_compute()
[all …]
H A Dfscounters.c391 struct xfs_rtgroup *rtg, in xchk_fscount_add_frextent() argument
412 struct xfs_rtgroup *rtg = NULL; in xchk_fscount_count_frextents() local
426 while ((rtg = xfs_rtgroup_next(mp, rtg))) { in xchk_fscount_count_frextents()
427 xfs_rtgroup_lock(rtg, XFS_RTGLOCK_BITMAP_SHARED); in xchk_fscount_count_frextents()
428 error = xfs_rtalloc_query_all(rtg, sc->tp, in xchk_fscount_count_frextents()
430 xfs_rtgroup_unlock(rtg, XFS_RTGLOCK_BITMAP_SHARED); in xchk_fscount_count_frextents()
433 xfs_rtgroup_rele(rtg); in xchk_fscount_count_frextents()
H A Drtbitmap_repair.c119 *word = be32_to_cpu(urk.rtg); in xfbmp_load()
133 urk.rtg = cpu_to_be32(word); in xfbmp_store()
191 struct xfs_rtgroup *rtg = sr->rtg; in xrep_rtbitmap_mark_free() local
202 if (!xfs_verify_rgbext(rtg, rtb->next_rgbno, rgbno - rtb->next_rgbno)) in xrep_rtbitmap_mark_free()
335 struct xfs_rtgroup *rtg = sc->sr.rtg; in xrep_rtbitmap_find_freespace() local
352 blockcount = rtg->rtg_extents * mp->m_sb.sb_rextsize; in xrep_rtbitmap_find_freespace()
519 struct xfs_group *xg = rtg_group(sc->sr.rtg); in xrep_rtbitmap()
H A Drgsuper.c39 xchk_xref_is_used_rt_space(sc, xfs_rgbno_to_rtb(sc->sr.rtg, 0), 1); in xchk_rgsuperblock_xref()
93 ASSERT(rtg_rgno(sc->sr.rtg) == 0); in xrep_rgsuperblock()
H A Dcow_repair.c346 struct xfs_rtgroup *rtg; in xrep_cow_find_bad_rt() local
351 rtg = xfs_rtgroup_get(sc->mp, in xrep_cow_find_bad_rt()
353 if (!rtg) in xrep_cow_find_bad_rt()
356 error = xrep_rtgroup_init(sc, rtg, &sc->sr, in xrep_cow_find_bad_rt()
382 xfs_rgbno_to_rtb(rtg, xc->next_bno), in xrep_cow_find_bad_rt()
413 xfs_rtgroup_put(rtg); in xrep_cow_find_bad_rt()
H A Dbmap.c722 struct xfs_rtgroup *rtg) in xchk_bmap_check_rt_rmaps() argument
728 xfs_rtgroup_lock(rtg, XFS_RTGLOCK_RMAP); in xchk_bmap_check_rt_rmaps()
729 cur = xfs_rtrmapbt_init_cursor(sc->tp, rtg); in xchk_bmap_check_rt_rmaps()
738 xfs_rtgroup_unlock(rtg, XFS_RTGLOCK_RMAP); in xchk_bmap_check_rt_rmaps()
847 struct xfs_rtgroup *rtg = NULL; in xchk_bmap_check_rmaps() local
849 while ((rtg = xfs_rtgroup_next(sc->mp, rtg))) { in xchk_bmap_check_rmaps()
850 error = xchk_bmap_check_rt_rmaps(sc, rtg); in xchk_bmap_check_rmaps()
853 xfs_rtgroup_rele(rtg); in xchk_bmap_check_rmaps()
H A Drtrmap.c57 error = xchk_install_live_inode(sc, rtg_rmap(sc->sr.rtg)); in xchk_setup_rtrmapbt()
215 xfs_rgbno_to_rtb(sc->sr.rtg, irec->rm_startblock), in xchk_rtrmapbt_xref()
261 xfs_rmap_inode_bmbt_owner(&oinfo, rtg_rmap(sc->sr.rtg), XFS_DATA_FORK); in xchk_rtrmapbt()
H A Drepair.h107 int xrep_rtgroup_init(struct xfs_scrub *sc, struct xfs_rtgroup *rtg,
114 # define xrep_rtgroup_init(sc, rtg, sr, lockflags) (-ENOSYS) argument

12