| /fs/xfs/scrub/ |
| A D | rtrmap.c | 49 error = xchk_rtgroup_init(sc, sc->sm->sm_agno, &sc->sr); in xchk_setup_rtrmapbt() 61 return xchk_rtgroup_lock(sc, &sc->sr, XCHK_RTGLOCK_ALL); in xchk_setup_rtrmapbt() 182 if (!sc->sr.refc_cur || xchk_skip_xref(sc->sm)) in xchk_rtrmapbt_xref_rtrefc() 196 xchk_btree_xref_set_corrupt(sc, sc->sr.refc_cur, 0); in xchk_rtrmapbt_xref_rtrefc() 209 xfs_rgbno_to_rtb(sc->sr.rtg, irec->rm_startblock), in xchk_rtrmapbt_xref() 247 struct xfs_inode *ip = rtg_rmap(sc->sr.rtg); in xchk_rtrmapbt() 270 if (!sc->sr.rmap_cur || xchk_skip_xref(sc->sm)) in xchk_xref_has_no_rt_owner() 277 xchk_btree_xref_set_corrupt(sc, sc->sr.rmap_cur, 0); in xchk_xref_has_no_rt_owner() 290 if (!sc->sr.rmap_cur || xchk_skip_xref(sc->sm)) in xchk_xref_has_rt_owner() 297 xchk_btree_xref_set_corrupt(sc, sc->sr.rmap_cur, 0); in xchk_xref_has_rt_owner() [all …]
|
| A D | rtrefcount.c | 44 error = xchk_rtgroup_init(sc, sc->sm->sm_agno, &sc->sr); in xchk_setup_rtrefcountbt() 56 return xchk_rtgroup_lock(sc, &sc->sr, XCHK_RTGLOCK_ALL); in xchk_setup_rtrefcountbt() 316 if (!sc->sr.rmap_cur || xchk_skip_xref(sc->sm)) in xchk_rtrefcountbt_xref_rmap() 333 xchk_btree_xref_set_corrupt(sc, sc->sr.rmap_cur, 0); in xchk_rtrefcountbt_xref_rmap() 352 xfs_rgbno_to_rtb(sc->sr.rtg, irec->rc_startblock), in xchk_rtrefcountbt_xref() 451 xchk_btree_xref_set_corrupt(sc, sc->sr.rmap_cur, 0); in xchk_rtrefcountbt_xref_gaps() 539 xchk_btree_xref_set_corrupt(sc, sc->sr.rmap_cur, 0); in xchk_refcount_xref_rmap() 588 if (!sc->sr.refc_cur || xchk_skip_xref(sc->sm)) in xchk_xref_is_rt_cow_staging() 631 if (!sc->sr.refc_cur || xchk_skip_xref(sc->sm)) in xchk_xref_is_not_rt_shared() 634 error = xfs_refcount_has_records(sc->sr.refc_cur, in xchk_xref_is_not_rt_shared() [all …]
|
| A D | common.c | 714 struct xchk_rt *sr) in xchk_rtgroup_init() argument 720 if (!sr->rtg) in xchk_rtgroup_init() 729 struct xchk_rt *sr, in xchk_rtgroup_lock() argument 799 sr->rmap_cur = xfs_rtrmapbt_init_cursor(sc->tp, sr->rtg); in xchk_rtgroup_lock() 802 sr->refc_cur = xfs_rtrefcountbt_init_cursor(sc->tp, sr->rtg); in xchk_rtgroup_lock() 814 struct xchk_rt *sr) in xchk_rtgroup_btcur_free() argument 816 if (sr->rmap_cur) in xchk_rtgroup_btcur_free() 818 if (sr->refc_cur) in xchk_rtgroup_btcur_free() 836 xfs_rtgroup_unlock(sr->rtg, sr->rtlock_flags); in xchk_rtgroup_unlock() 855 sr->rtg = NULL; in xchk_rtgroup_free() [all …]
|
| A D | common.h | 138 struct xchk_rt *sr); 144 struct xchk_rt *sr) in xchk_rtgroup_init_existing() argument 146 int error = xchk_rtgroup_init(sc, rgno, sr); in xchk_rtgroup_init_existing() 153 void xchk_rtgroup_unlock(struct xchk_rt *sr); 154 void xchk_rtgroup_btcur_free(struct xchk_rt *sr); 157 # define xchk_rtgroup_init(sc, rgno, sr) (-EFSCORRUPTED) argument 159 # define xchk_rtgroup_lock(sc, sr, lockflags) (-EFSCORRUPTED) argument 160 # define xchk_rtgroup_unlock(sr) do { } while (0) argument 161 # define xchk_rtgroup_btcur_free(sr) do { } while (0) argument 162 # define xchk_rtgroup_free(sc, sr) do { } while (0) argument [all …]
|
| A D | rtrmap_repair.c | 132 if (xfs_rtrmap_check_irec(sc->sr.rtg, rec) != NULL) in xrep_rtrmap_check_mapping() 233 rtg_rgno(rf->rr->sc->sr.rtg)) in xrep_rtrmap_visit_bmbt() 507 error = xfs_refcount_query_range(sc->sr.refc_cur, &low, &high, in xrep_rtrmap_find_refcount_rmaps() 552 if (xfs_has_rtsb(sc->mp) && rtg_rgno(rr->sc->sr.rtg) == 0) { in xrep_rtrmap_find_rmaps() 560 xrep_rtgroup_btcur_init(sc, &sc->sr); in xrep_rtrmap_find_rmaps() 562 xchk_rtgroup_btcur_free(&sc->sr); in xrep_rtrmap_find_rmaps() 582 xchk_rtgroup_unlock(&sc->sr); in xrep_rtrmap_find_rmaps() 606 error = xchk_rtgroup_lock(sc, &sc->sr, XCHK_RTGLOCK_ALL); in xrep_rtrmap_find_rmaps() 713 struct xfs_rtgroup *rtg = sc->sr.rtg; in xrep_rtrmap_build_new_tree() 897 rtg_rgno(sc->sr.rtg)); in xrep_rtrmap_setup_scan() [all …]
|
| A D | rgsuper.c | 37 xchk_xref_is_used_rt_space(sc, xfs_rgbno_to_rtb(sc->sr.rtg, 0), 1); in xchk_rgsuperblock_xref() 62 error = xchk_rtgroup_init_existing(sc, rgno, &sc->sr); in xchk_rgsuperblock() 66 error = xchk_rtgroup_lock(sc, &sc->sr, XFS_RTGLOCK_BITMAP_SHARED); in xchk_rgsuperblock() 83 ASSERT(rtg_rgno(sc->sr.rtg) == 0); in xrep_rgsuperblock()
|
| A D | rtbitmap_repair.c | 187 struct xchk_rt *sr = &rtb->sc->sr; in xrep_rtbitmap_mark_free() local 188 struct xfs_rtgroup *rtg = sr->rtg; in xrep_rtbitmap_mark_free() 217 if (sr->refc_cur) { in xrep_rtbitmap_mark_free() 218 error = xfs_refcount_has_records(sr->refc_cur, in xrep_rtbitmap_mark_free() 226 error = xfs_refcount_has_records(sr->refc_cur, in xrep_rtbitmap_mark_free() 332 struct xfs_rtgroup *rtg = sc->sr.rtg; in xrep_rtbitmap_find_freespace() 339 xrep_rtgroup_btcur_init(sc, &sc->sr); in xrep_rtbitmap_find_freespace() 340 error = xfs_rmap_query_all(sc->sr.rmap_cur, xrep_rtbitmap_walk_rtrmap, in xrep_rtbitmap_find_freespace() 357 xchk_rtgroup_btcur_free(&sc->sr); in xrep_rtbitmap_find_freespace() 516 struct xfs_group *xg = rtg_group(sc->sr.rtg); in xrep_rtbitmap()
|
| A D | rtrefcount_repair.c | 148 if (xfs_rtrefcount_check_irec(sc->sr.rtg, rec) != NULL) in xrep_rtrefc_check_ext() 189 trace_xrep_refc_found(rtg_group(rr->sc->sr.rtg), &irec); in xrep_rtrefc_stash() 227 struct xfs_btree_cur *cur = rr->sc->sr.rmap_cur; in xrep_rtrefc_walk_rmaps() 409 error = xfs_btree_decrement(sc->sr.rmap_cur, 0, &have_gt); in xrep_rtrefc_push_rmaps_at() 413 xfs_btree_mark_sick(sc->sr.rmap_cur); in xrep_rtrefc_push_rmaps_at() 462 xrep_rtgroup_btcur_init(sc, &sc->sr); in xrep_rtrefc_find_refcounts() 474 error = xfs_btree_goto_left_edge(sc->sr.rmap_cur); in xrep_rtrefc_find_refcounts() 479 while (xfs_btree_has_more_records(sc->sr.rmap_cur)) { in xrep_rtrefc_find_refcounts() 554 xchk_rtgroup_btcur_free(&sc->sr); in xrep_rtrefc_find_refcounts() 619 struct xfs_rtgroup *rtg = sc->sr.rtg; in xrep_rtrefc_build_new_tree()
|
| A D | repair.c | 72 xchk_rtgroup_btcur_free(&sc->sr); in xrep_attempt() 1004 struct xchk_rt *sr) in xrep_rtgroup_btcur_init() argument 1008 ASSERT(sr->rtg != NULL); in xrep_rtgroup_btcur_init() 1011 (sr->rtlock_flags & XFS_RTGLOCK_RMAP) && in xrep_rtgroup_btcur_init() 1013 sr->rmap_cur = xfs_rtrmapbt_init_cursor(sc->tp, sr->rtg); in xrep_rtgroup_btcur_init() 1018 sr->refc_cur = xfs_rtrefcountbt_init_cursor(sc->tp, sr->rtg); in xrep_rtgroup_btcur_init() 1029 struct xchk_rt *sr, in xrep_rtgroup_init() argument 1032 ASSERT(sr->rtg == NULL); in xrep_rtgroup_init() 1035 sr->rtlock_flags = rtglock_flags; in xrep_rtgroup_init() 1038 sr->rtg = xfs_rtgroup_hold(rtg); in xrep_rtgroup_init() [all …]
|
| A D | rtbitmap.c | 51 error = xchk_rtgroup_init(sc, sc->sm->sm_agno, &sc->sr); in xchk_setup_rtbitmap() 65 error = xchk_install_live_inode(sc, rtg_bitmap(sc->sr.rtg)); in xchk_setup_rtbitmap() 73 error = xchk_rtgroup_lock(sc, &sc->sr, XCHK_RTGLOCK_ALL); in xchk_setup_rtbitmap() 105 if (!sc->sr.rmap_cur) in xchk_rtbitmap_xref() 195 struct xfs_rtgroup *rtg = sc->sr.rtg; in xchk_rtbitmap() 275 struct xfs_rtgroup *rtg = sc->sr.rtg; in xchk_xref_is_used_rt_space()
|
| A D | rtsummary.c | 59 error = xchk_rtgroup_init(sc, sc->sm->sm_agno, &sc->sr); in xchk_setup_rtsummary() 84 error = xchk_install_live_inode(sc, rtg_summary(sc->sr.rtg)); in xchk_setup_rtsummary() 92 error = xchk_rtgroup_lock(sc, &sc->sr, XFS_RTGLOCK_BITMAP); in xchk_setup_rtsummary() 218 struct xfs_rtgroup *rtg = sc->sr.rtg; 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()
|
| 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 …]
|
| 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 | cow_repair.c | 340 error = xrep_rtgroup_init(sc, rtg, &sc->sr, in xrep_cow_find_bad_rt() 349 error = xfs_refcount_query_range(sc->sr.refc_cur, &rc_low, &rc_high, in xrep_cow_find_bad_rt() 359 error = xfs_refcount_query_range(sc->sr.refc_cur, &rc_low, &rc_high, in xrep_cow_find_bad_rt() 377 error = xfs_rmap_query_range(sc->sr.rmap_cur, &rm_low, &rm_high, in xrep_cow_find_bad_rt() 396 xchk_rtgroup_btcur_free(&sc->sr); in xrep_cow_find_bad_rt() 397 xchk_rtgroup_free(sc, &sc->sr); in xrep_cow_find_bad_rt()
|
| A D | repair.h | 116 struct xchk_rt *sr, unsigned int rtglock_flags); 117 void xrep_rtgroup_btcur_init(struct xfs_scrub *sc, struct xchk_rt *sr); 122 # define xrep_rtgroup_init(sc, rtg, sr, lockflags) (-ENOSYS) argument
|
| A D | bmap_repair.c | 112 cur = sc->sr.refc_cur; in xrep_bmap_discover_shared() 459 error = xrep_rtgroup_init(sc, rtg, &sc->sr, in xrep_bmap_scan_rtgroup() 466 error = xfs_rmap_query_all(sc->sr.rmap_cur, xrep_bmap_walk_rtrmap, rb); in xrep_bmap_scan_rtgroup() 467 xchk_rtgroup_btcur_free(&sc->sr); in xrep_bmap_scan_rtgroup() 468 xchk_rtgroup_free(sc, &sc->sr); in xrep_bmap_scan_rtgroup()
|
| A D | bmap.c | 159 curp = &info->sc->sr.rmap_cur; in xchk_bmap_get_rmap() 333 &info->sc->sr); in xchk_bmap_rt_iextent_xref() 338 error = xchk_rtgroup_lock(info->sc, &info->sc->sr, XCHK_RTGLOCK_ALL); in xchk_bmap_rt_iextent_xref() 376 xchk_rtgroup_btcur_free(&info->sc->sr); in xchk_bmap_rt_iextent_xref() 378 xchk_rtgroup_free(info->sc, &info->sc->sr); in xchk_bmap_rt_iextent_xref()
|
| A D | scrub.c | 233 xchk_rtgroup_btcur_free(&sc->sr); in xchk_teardown() 242 if (sc->sr.rtg) in xchk_teardown() 243 xchk_rtgroup_free(sc, &sc->sr); in xchk_teardown()
|
| A D | inode_repair.c | 813 error = xrep_rtgroup_init(sc, rtg, &sc->sr, XFS_RTGLOCK_RMAP); in xrep_dinode_count_rtgroup_rmaps() 817 error = xfs_rmap_query_all(sc->sr.rmap_cur, xrep_dinode_walk_rtrmap, in xrep_dinode_count_rtgroup_rmaps() 819 xchk_rtgroup_btcur_free(&sc->sr); in xrep_dinode_count_rtgroup_rmaps() 820 xchk_rtgroup_free(sc, &sc->sr); in xrep_dinode_count_rtgroup_rmaps()
|
| A D | scrub.h | 204 struct xchk_rt sr; member
|
| /fs/ |
| A D | ioctl.c | 272 struct space_resv sr; in ioctl_preallocate() local 274 if (copy_from_user(&sr, argp, sizeof(sr))) in ioctl_preallocate() 277 switch (sr.l_whence) { in ioctl_preallocate() 281 sr.l_start += filp->f_pos; in ioctl_preallocate() 284 sr.l_start += i_size_read(inode); in ioctl_preallocate() 291 sr.l_len); in ioctl_preallocate() 301 struct space_resv_32 sr; in compat_ioctl_preallocate() local 303 if (copy_from_user(&sr, argp, sizeof(sr))) in compat_ioctl_preallocate() 306 switch (sr.l_whence) { in compat_ioctl_preallocate() 310 sr.l_start += file->f_pos; in compat_ioctl_preallocate() [all …]
|
| /fs/ocfs2/ |
| A D | file.c | 1973 switch (sr->l_whence) { in __ocfs2_change_file_space() 1977 sr->l_start += f_pos; in __ocfs2_change_file_space() 1986 sr->l_whence = 0; in __ocfs2_change_file_space() 1988 llen = sr->l_len > 0 ? sr->l_len - 1 : sr->l_len; in __ocfs2_change_file_space() 1990 if (sr->l_start < 0 in __ocfs2_change_file_space() 1997 size = sr->l_start + sr->l_len; in __ocfs2_change_file_space() 2001 if (sr->l_len <= 0) { in __ocfs2_change_file_space() 2024 sr->l_len); in __ocfs2_change_file_space() 2029 sr->l_len); in __ocfs2_change_file_space() 2134 sr.l_whence = 0; in ocfs2_fallocate() [all …]
|
| A D | ioctl.c | 853 struct ocfs2_space_resv sr; in ocfs2_ioctl() local 855 if (copy_from_user(&sr, (int __user *) arg, sizeof(sr))) in ocfs2_ioctl() 858 return ocfs2_change_file_space(filp, cmd, &sr); in ocfs2_ioctl()
|
| A D | file.h | 67 struct ocfs2_space_resv *sr);
|
| /fs/nilfs2/ |
| A D | recovery.c | 141 struct nilfs_super_root *sr; in nilfs_read_super_root_block() local 152 sr = (struct nilfs_super_root *)bh_sr->b_data; in nilfs_read_super_root_block() 154 unsigned int bytes = le16_to_cpu(sr->sr_bytes); in nilfs_read_super_root_block() 161 nilfs, bh_sr, &crc, sizeof(sr->sr_sum), bytes, in nilfs_read_super_root_block() 166 if (crc != le32_to_cpu(sr->sr_sum)) { in nilfs_read_super_root_block()
|