| /fs/xfs/libxfs/ |
| A D | xfs_zones.c | 20 struct xfs_rtgroup *rtg, in xfs_zone_validate_empty() argument 27 rtg_rgno(rtg), rtg_rmap(rtg)->i_used_blocks); in xfs_zone_validate_empty() 38 struct xfs_rtgroup *rtg, in xfs_zone_validate_wp() argument 44 if (rtg_rmap(rtg)->i_used_blocks > rtg->rtg_extents) { in xfs_zone_validate_wp() 46 rtg_rgno(rtg), rtg_rmap(rtg)->i_used_blocks); in xfs_zone_validate_wp() 69 struct xfs_rtgroup *rtg, in xfs_zone_validate_full() argument 74 if (rtg_rmap(rtg)->i_used_blocks > rtg->rtg_extents) { in xfs_zone_validate_full() 76 rtg_rgno(rtg), rtg_rmap(rtg)->i_used_blocks); in xfs_zone_validate_full() 87 struct xfs_rtgroup *rtg, in xfs_zone_validate_seq() argument 117 struct xfs_rtgroup *rtg) in xfs_zone_validate_conv() argument [all …]
|
| A D | xfs_rtgroup.h | 74 return &rtg->rtg_group; in rtg_group() 123 struct xfs_rtgroup *rtg) in xfs_rtgroup_hold() argument 130 struct xfs_rtgroup *rtg) in xfs_rtgroup_put() argument 146 struct xfs_rtgroup *rtg) in xfs_rtgroup_rele() argument 154 struct xfs_rtgroup *rtg, in xfs_rtgroup_next_range() argument 158 return to_rtg(xfs_group_next_range(mp, rtg ? rtg_group(rtg) : NULL, in xfs_rtgroup_next_range() 165 struct xfs_rtgroup *rtg) in xfs_rtgroup_next() argument 172 struct xfs_rtgroup *rtg, in xfs_verify_rgbno() argument 187 struct xfs_rtgroup *rtg, in xfs_verify_rgbext() argument 198 struct xfs_rtgroup *rtg, in xfs_rgbno_to_rtb() argument [all …]
|
| A D | xfs_rtgroup.c | 55 struct xfs_rtgroup *rtg, in xfs_rtgroup_calc_geometry() argument 61 rtg_group(rtg)->xg_block_count = rtg->rtg_extents * mp->m_sb.sb_rextsize; in xfs_rtgroup_calc_geometry() 72 struct xfs_rtgroup *rtg; in xfs_rtgroup_alloc() local 76 if (!rtg) in xfs_rtgroup_alloc() 87 kfree(rtg); in xfs_rtgroup_alloc() 173 struct xfs_rtgroup *rtg; in xfs_update_last_rtgroup_size() local 178 if (!rtg) in xfs_update_last_rtgroup_size() 182 rtg_group(rtg)->xg_block_count = rtg->rtg_extents * mp->m_sb.sb_rextsize; in xfs_update_last_rtgroup_size() 183 xfs_rtgroup_rele(rtg); in xfs_update_last_rtgroup_size() 190 struct xfs_rtgroup *rtg, in xfs_rtgroup_lock() argument [all …]
|
| A D | xfs_rtbitmap.h | 12 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 …]
|
| A D | xfs_rtbitmap.c | 1053 struct xfs_rtgroup *rtg, in xfs_rtfree_extent() argument 1062 .rtg = rtg, in xfs_rtfree_extent() 1118 struct xfs_rtgroup *rtg, in xfs_rtfree_blocks() argument 1165 .rtg = rtg, in xfs_rtalloc_query_range() 1222 return xfs_rtalloc_query_range(rtg, tp, 0, rtg->rtg_extents - 1, fn, in xfs_rtalloc_query_all() 1236 .mp = rtg_mount(rtg), in xfs_rtalloc_extent_is_free() 1237 .rtg = rtg, in xfs_rtalloc_extent_is_free() 1367 struct xfs_rtgroup *rtg, in xfs_rtfile_initialize_block() argument 1435 struct xfs_rtgroup *rtg, in xfs_rtfile_initialize_blocks() argument 1476 struct xfs_rtgroup *rtg, in xfs_rtbitmap_create() argument [all …]
|
| A D | xfs_rtrmap_btree.h | 20 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);
|
| A D | xfs_health.h | 257 #define xfs_rtgroup_has_sickness(rtg, mask) \ argument 258 xfs_group_has_sickness(rtg_group(rtg), (mask)) 259 #define xfs_rtgroup_is_healthy(rtg) \ argument 260 (!xfs_rtgroup_has_sickness((rtg), UINT_MAX)) 285 void xfs_rtgroup_geom_health(struct xfs_rtgroup *rtg,
|
| A D | xfs_rtrmap_btree.c | 506 struct xfs_rtgroup *rtg) in xfs_rtrmapbt_init_cursor() argument 508 struct xfs_inode *ip = rtg_rmap(rtg); in xfs_rtrmapbt_init_cursor() 509 struct xfs_mount *mp = rtg_mount(rtg); in xfs_rtrmapbt_init_cursor() 613 struct xfs_rtgroup *rtg, in xfs_rtrmapbt_mem_cursor() argument 617 struct xfs_mount *mp = rtg_mount(rtg); in xfs_rtrmapbt_mem_cursor() 967 struct xfs_rtgroup *rtg, in xfs_rtrmapbt_create() argument 997 struct xfs_rtgroup *rtg, in xfs_rtrmapbt_init_rtsb() argument 1008 ASSERT(rtg_rgno(rtg) == 0); in xfs_rtrmapbt_init_rtsb() 1010 cur = xfs_rtrmapbt_init_cursor(tp, rtg); in xfs_rtrmapbt_init_rtsb() 1021 struct xfs_rtgroup *rtg) in xfs_rtrmap_highest_rgbno() argument [all …]
|
| A D | xfs_metafile.c | 260 struct xfs_rtgroup *rtg = NULL; in xfs_metafile_resv_init() local 280 while ((rtg = xfs_rtgroup_next(mp, rtg))) { in xfs_metafile_resv_init() 282 used += rtg_rmap(rtg)->i_nblocks; in xfs_metafile_resv_init() 286 used += rtg_refcount(rtg)->i_nblocks; in xfs_metafile_resv_init()
|
| /fs/xfs/ |
| A D | xfs_rtalloc.c | 909 xfs_rtgroup_calc_geometry(nmp, rtg, rtg_rgno(rtg), in xfs_growfs_rt_zoned() 951 .rtg = rtg, in xfs_growfs_rt_bmblock() 954 .rtg = rtg, in xfs_growfs_rt_bmblock() 970 xfs_rtgroup_calc_geometry(nmp, rtg, rtg_rgno(rtg), in xfs_growfs_rt_bmblock() 1182 if (!rtg) in xfs_growfs_rtg() 1220 xfs_rtgroup_calc_geometry(mp, rtg, rtg_rgno(rtg), mp->m_sb.sb_rgcount, in xfs_growfs_rtg() 1588 while ((rtg = xfs_rtgroup_next(mp, rtg))) { in xfs_rtalloc_reinit_frextents() 1680 while ((rtg = xfs_rtgroup_next(mp, rtg))) { in xfs_rtmount_inodes() 1700 while ((rtg = xfs_rtgroup_next(mp, rtg))) in xfs_rtunmount_inodes() 1794 struct xfs_rtgroup *rtg = args->rtg; in xfs_rtalloc_check_busy() local [all …]
|
| A D | xfs_zone_alloc.c | 70 struct xfs_rtgroup *rtg, in xfs_zone_account_reclaimable() argument 146 trace_xfs_zone_full(rtg); in xfs_open_zone_mark_full() 163 xfs_zone_account_reclaimable(rtg, rtg_blocks(rtg) - used); in xfs_open_zone_mark_full() 343 struct xfs_rtgroup *rtg, in xfs_zone_free_blocks() argument 402 if (!rtg) in xfs_last_used_zone() 411 xfs_rtgroup_rele(rtg); in xfs_last_used_zone() 452 oz->oz_rtg = rtg; in xfs_init_open_zone() 1090 xfs_zone_account_reclaimable(rtg, rtg_blocks(rtg) - used); in xfs_init_zone() 1117 if (!rtg) { in xfs_get_zone_info_cb() 1122 xfs_rtgroup_rele(rtg); in xfs_get_zone_info_cb() [all …]
|
| A D | xfs_discard.c | 527 struct xfs_rtgroup *rtg, in xfs_trim_gather_rtextent() argument 571 struct xfs_rtgroup *rtg, in xfs_trim_rtextents() argument 576 struct xfs_mount *mp = rtg_mount(rtg); in xfs_trim_rtextents() 640 struct xfs_rtgroup *rtg, in xfs_trim_gather_rtgroup_extent() argument 688 struct xfs_rtgroup *rtg, in xfs_trim_rtgroup_extents() argument 693 struct xfs_mount *mp = rtg_mount(rtg); in xfs_trim_rtgroup_extents() 765 struct xfs_rtgroup *rtg = NULL; in xfs_trim_rtdev_extents() local 785 while ((rtg = xfs_rtgroup_next_range(mp, rtg, start_rgno, end_rgno))) { in xfs_trim_rtdev_extents() 786 xfs_rtxnum_t rtg_end = rtg->rtg_extents; in xfs_trim_rtdev_extents() 788 if (rtg_rgno(rtg) == end_rgno) in xfs_trim_rtdev_extents() [all …]
|
| A D | xfs_zone_gc.c | 451 if (!rtg) in xfs_zone_gc_pick_victim_from() 457 xfs_rtgroup_rele(rtg); in xfs_zone_gc_pick_victim_from() 463 victim_rtg = rtg; in xfs_zone_gc_pick_victim_from() 473 rtg_rmap(rtg)->i_used_blocks < rtg_blocks(rtg) / 100) in xfs_zone_gc_pick_victim_from() 880 struct xfs_mount *mp = rtg_mount(rtg); in xfs_zone_gc_finish_reset() 902 struct xfs_rtgroup *rtg) in xfs_zone_gc_prepare_reset() argument 904 trace_xfs_zone_reset(rtg); in xfs_zone_gc_prepare_reset() 913 XFS_FSB_TO_B(rtg_mount(rtg), rtg_blocks(rtg)); in xfs_zone_gc_prepare_reset() 921 struct xfs_rtgroup *rtg) in xfs_zone_gc_reset_sync() argument 952 xfs_log_force_inode(rtg_rmap(rtg)); in xfs_zone_gc_reset_zones() [all …]
|
| A D | xfs_health.c | 48 struct xfs_rtgroup *rtg = NULL; in xfs_health_unmount() local 61 while ((rtg = xfs_rtgroup_next(mp, rtg))) in xfs_health_unmount() 62 xfs_health_unmount_group(rtg_group(rtg), &warn); in xfs_health_unmount() 259 struct xfs_rtgroup *rtg = xfs_rtgroup_get(mp, rgno); in xfs_rgno_mark_sick() local 262 if (!rtg) in xfs_rgno_mark_sick() 265 xfs_group_mark_sick(rtg_group(rtg), mask); in xfs_rgno_mark_sick() 266 xfs_rtgroup_put(rtg); in xfs_rgno_mark_sick() 391 struct xfs_rtgroup *rtg = NULL; in xfs_fsop_geom_health() local 403 while ((rtg = xfs_rtgroup_next(mp, rtg))) { in xfs_fsop_geom_health() 457 struct xfs_rtgroup *rtg, in xfs_rtgroup_geom_health() argument [all …]
|
| A D | xfs_fsmap.c | 717 struct xfs_rtgroup *rtg, in xfs_getfsmap_rtdev_rtbitmap_helper() argument 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() 810 rtg->rtg_extents), in xfs_getfsmap_rtdev_rtbitmap() 826 if (rtg) { in xfs_getfsmap_rtdev_rtbitmap() 831 xfs_rtgroup_rele(rtg); in xfs_getfsmap_rtdev_rtbitmap() 971 while ((rtg = xfs_rtgroup_next_range(mp, rtg, start_rg, end_rg))) { in xfs_getfsmap_rtdev_rmapbt() 976 info->group = rtg_group(rtg); in xfs_getfsmap_rtdev_rmapbt() 1035 if (rtg) { in xfs_getfsmap_rtdev_rmapbt() [all …]
|
| A D | xfs_notify_failure.c | 287 struct xfs_rtgroup *rtg = NULL; in xfs_dax_notify_dev_failure() local 302 rtg = to_rtg(xg); in xfs_dax_notify_dev_failure() 303 xfs_rtgroup_lock(rtg, XFS_RTGLOCK_RMAP); in xfs_dax_notify_dev_failure() 304 cur = xfs_rtrmapbt_init_cursor(tp, rtg); in xfs_dax_notify_dev_failure() 329 if (rtg) in xfs_dax_notify_dev_failure() 330 xfs_rtgroup_unlock(rtg, XFS_RTGLOCK_RMAP); in xfs_dax_notify_dev_failure()
|
| /fs/xfs/scrub/ |
| A D | rtbitmap.c | 65 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() 195 struct xfs_rtgroup *rtg = sc->sr.rtg; in xchk_rtbitmap() local 196 struct xfs_inode *rbmip = rtg_bitmap(rtg); in xchk_rtbitmap() 261 last_rgbno = rtg->rtg_extents * mp->m_sb.sb_rextsize - 1; in xchk_rtbitmap() 275 struct xfs_rtgroup *rtg = sc->sr.rtg; in xchk_xref_is_used_rt_space() local 285 if (!xfs_zone_rgbno_is_valid(rtg, in xchk_xref_is_used_rt_space() 287 xchk_ino_xref_set_corrupt(sc, rtg_rmap(rtg)->i_ino); in xchk_xref_is_used_rt_space() 293 error = xfs_rtalloc_extent_is_free(rtg, sc->tp, startext, in xchk_xref_is_used_rt_space() [all …]
|
| A D | rtsummary.c | 157 be32_add_cpu(&v->rtg, 1); in xchk_rtsum_inc() 158 return be32_to_cpu(v->rtg); in xchk_rtsum_inc() 168 struct xfs_rtgroup *rtg, in xchk_rtsum_record_free() argument 173 struct xfs_mount *mp = rtg_mount(rtg); in xchk_rtsum_record_free() 192 rtbno = xfs_rtx_to_rtb(rtg, rec->ar_startext); in xchk_rtsum_record_free() 218 struct xfs_rtgroup *rtg = sc->sr.rtg; in xchk_rtsum_compute() local 222 rtg_bitmap(rtg)->i_disk_size) in xchk_rtsum_compute() 246 rts->args.rtg = sc->sr.rtg; in xchk_rtsum_compare() 313 struct xfs_rtgroup *rtg = sc->sr.rtg; in xchk_rtsummary() local 314 struct xfs_inode *rbmip = rtg_bitmap(rtg); in xchk_rtsummary() [all …]
|
| A D | health.c | 171 struct xfs_rtgroup *rtg = NULL; in xchk_mark_all_healthy() local 176 while ((rtg = xfs_rtgroup_next(mp, rtg))) in xchk_mark_all_healthy() 177 xfs_group_mark_healthy(rtg_group(rtg), XFS_SICK_RG_INDIRECT); in xchk_mark_all_healthy() 195 struct xfs_rtgroup *rtg; in xchk_update_health() local 256 rtg = xfs_rtgroup_get(sc->mp, sc->sm->sm_agno); in xchk_update_health() 258 xfs_group_mark_corrupt(rtg_group(rtg), mask); in xchk_update_health() 260 xfs_group_mark_healthy(rtg_group(rtg), mask); in xchk_update_health() 261 xfs_rtgroup_put(rtg); in xchk_update_health() 316 struct xfs_rtgroup *rtg = NULL; in xchk_health_record() local 330 while ((rtg = xfs_rtgroup_next(mp, rtg))) { in xchk_health_record() [all …]
|
| A D | rtrmap_repair.c | 132 if (xfs_rtrmap_check_irec(sc->sr.rtg, rec) != NULL) in xrep_rtrmap_check_mapping() 171 mcur = xfs_rtrmapbt_mem_cursor(sc->sr.rtg, sc->tp, &rr->rtrmap_btree); in xrep_rtrmap_stash() 233 rtg_rgno(rf->rr->sc->sr.rtg)) in xrep_rtrmap_visit_bmbt() 552 if (xfs_has_rtsb(sc->mp) && rtg_rgno(rr->sc->sr.rtg) == 0) { in xrep_rtrmap_find_rmaps() 713 struct xfs_rtgroup *rtg = sc->sr.rtg; in xrep_rtrmap_build_new_tree() local 731 rmap_cur = xfs_rtrmapbt_init_cursor(NULL, rtg); in xrep_rtrmap_build_new_tree() 751 error = xfs_trans_reserve_more_inode(sc->tp, rtg_rmap(rtg), in xrep_rtrmap_build_new_tree() 855 trace_xrep_rmap_live_update(rtg_group(rr->sc->sr.rtg), action, p); in xrep_rtrmapbt_live_update() 897 rtg_rgno(sc->sr.rtg)); in xrep_rtrmap_setup_scan() 912 error = xfs_rmap_hook_add(rtg_group(sc->sr.rtg), &rr->rhook); in xrep_rtrmap_setup_scan() [all …]
|
| A D | common.c | 716 ASSERT(sr->rtg == NULL); in xchk_rtgroup_init() 719 sr->rtg = xfs_rtgroup_get(sc->mp, rgno); in xchk_rtgroup_init() 720 if (!sr->rtg) in xchk_rtgroup_init() 734 ASSERT(sr->rtg != NULL); in xchk_rtgroup_lock() 743 xfs_rtgroup_lock(sr->rtg, rtglock_flags); in xchk_rtgroup_lock() 752 xfs_rtgroup_lock(sr->rtg, rtglock_flags); in xchk_rtgroup_lock() 833 ASSERT(sr->rtg != NULL); in xchk_rtgroup_unlock() 850 ASSERT(sr->rtg != NULL); in xchk_rtgroup_free() 854 xfs_rtgroup_put(sr->rtg); in xchk_rtgroup_free() 855 sr->rtg = NULL; in xchk_rtgroup_free() [all …]
|
| A D | fscounters.c | 391 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()
|
| A D | rtbitmap_repair.c | 116 *word = be32_to_cpu(urk.rtg); in xfbmp_load() 130 urk.rtg = cpu_to_be32(word); in xfbmp_store() 188 struct xfs_rtgroup *rtg = sr->rtg; in xrep_rtbitmap_mark_free() local 199 if (!xfs_verify_rgbext(rtg, rtb->next_rgbno, rgbno - rtb->next_rgbno)) in xrep_rtbitmap_mark_free() 332 struct xfs_rtgroup *rtg = sc->sr.rtg; in xrep_rtbitmap_find_freespace() local 349 blockcount = rtg->rtg_extents * mp->m_sb.sb_rextsize; in xrep_rtbitmap_find_freespace() 516 struct xfs_group *xg = rtg_group(sc->sr.rtg); in xrep_rtbitmap()
|
| A D | rtsummary_repair.c | 81 rts->args.rtg = sc->sr.rtg; in xrep_rtsummary_prep_buf() 178 if (sc->sr.rtg->rtg_rsum_cache) in xrep_rtsummary() 179 memset(sc->sr.rtg->rtg_rsum_cache, 0xFF, mp->m_sb.sb_rbmblocks); in xrep_rtsummary()
|
| A D | reap.c | 711 cur = xfs_rtrmapbt_init_cursor(sc->tp, sc->sr.rtg); in xreap_rgextent_select() 737 trace_xreap_agextent_select(rtg_group(sc->sr.rtg), rgbno, len, in xreap_rgextent_select() 770 rtbno = xfs_rgbno_to_rtb(sc->sr.rtg, rgbno); in xreap_rgextent_iter() 777 trace_xreap_dispose_unmap_extent(rtg_group(sc->sr.rtg), rgbno, in xreap_rgextent_iter() 828 ASSERT(!sc->sr.rtg); in xreap_rtmeta_extent() 834 sc->sr.rtg = xfs_rtgroup_get(sc->mp, xfs_rtb_to_rgno(sc->mp, rtbno)); in xreap_rtmeta_extent() 835 if (!sc->sr.rtg) in xreap_rtmeta_extent() 838 xfs_rtgroup_lock(sc->sr.rtg, XREAP_RTGLOCK_ALL); in xreap_rtmeta_extent() 869 xfs_rtgroup_unlock(sc->sr.rtg, XREAP_RTGLOCK_ALL); in xreap_rtmeta_extent() 870 xfs_rtgroup_put(sc->sr.rtg); in xreap_rtmeta_extent() [all …]
|