Home
last modified time | relevance | path

Searched refs:irec (Results 1 – 25 of 28) sorted by relevance

12

/linux/fs/xfs/scrub/
H A Dbmap.c147 struct xfs_bmbt_irec *irec, in xchk_bmap_get_rmap() argument
166 if (irec->br_state == XFS_EXT_UNWRITTEN) in xchk_bmap_get_rmap()
176 offset = irec->br_startoff; in xchk_bmap_get_rmap()
195 irec->br_startoff); in xchk_bmap_get_rmap()
203 struct xfs_bmbt_irec *irec, in xchk_bmap_xref_rmap() argument
214 if (!xchk_bmap_get_rmap(info, irec, bno, owner, &rmap)) in xchk_bmap_xref_rmap()
223 irec->br_startoff); in xchk_bmap_xref_rmap()
226 if (rmap_end != bno + irec->br_blockcount) in xchk_bmap_xref_rmap()
228 irec->br_startoff); in xchk_bmap_xref_rmap()
231 if (rmap.rm_offset != irec->br_startoff) in xchk_bmap_xref_rmap()
[all …]
H A Drtrmap.c84 const struct xfs_rmap_irec *irec) in xchk_rtrmapbt_is_shareable() argument
88 if (irec->rm_flags & XFS_RMAP_UNWRITTEN) in xchk_rtrmapbt_is_shareable()
90 if (irec->rm_owner == XFS_RMAP_OWN_COW || in xchk_rtrmapbt_is_shareable()
91 irec->rm_owner == XFS_RMAP_OWN_FS) in xchk_rtrmapbt_is_shareable()
101 const struct xfs_rmap_irec *irec) in xchk_rtrmapbt_check_overlapping() argument
114 if (pnext <= irec->rm_startblock) in xchk_rtrmapbt_check_overlapping()
119 !xchk_rtrmapbt_is_shareable(bs->sc, irec)) in xchk_rtrmapbt_check_overlapping()
123 inext = irec->rm_startblock + irec->rm_blockcount; in xchk_rtrmapbt_check_overlapping()
128 memcpy(&cr->overlap_rec, irec, sizeof(struct xfs_rmap_irec)); in xchk_rtrmapbt_check_overlapping()
163 const struct xfs_rmap_irec *irec) in xchk_rtrmapbt_check_mergeable() argument
[all …]
H A Drmap.c82 struct xfs_rmap_irec *irec) in xchk_rmapbt_xref_refc() argument
95 non_inode = XFS_RMAP_NON_INODE_OWNER(irec->rm_owner); in xchk_rmapbt_xref_refc()
96 is_bmbt = irec->rm_flags & XFS_RMAP_BMBT_BLOCK; in xchk_rmapbt_xref_refc()
97 is_attr = irec->rm_flags & XFS_RMAP_ATTR_FORK; in xchk_rmapbt_xref_refc()
98 is_unwritten = irec->rm_flags & XFS_RMAP_UNWRITTEN; in xchk_rmapbt_xref_refc()
101 error = xfs_refcount_find_shared(sc->sa.refc_cur, irec->rm_startblock, in xchk_rmapbt_xref_refc()
102 irec->rm_blockcount, &fbno, &flen, false); in xchk_rmapbt_xref_refc()
113 struct xfs_rmap_irec *irec) in xchk_rmapbt_xref() argument
115 xfs_agblock_t agbno = irec->rm_startblock; in xchk_rmapbt_xref()
116 xfs_extlen_t len = irec->rm_blockcount; in xchk_rmapbt_xref()
[all …]
H A Drefcount.c286 const struct xfs_refcount_irec *irec) in xchk_refcountbt_xref_rmap() argument
290 .bno = irec->rc_startblock, in xchk_refcountbt_xref_rmap()
291 .len = irec->rc_blockcount, in xchk_refcountbt_xref_rmap()
292 .refcount = irec->rc_refcount, in xchk_refcountbt_xref_rmap()
306 low.rm_startblock = irec->rc_startblock; in xchk_refcountbt_xref_rmap()
308 high.rm_startblock = irec->rc_startblock + irec->rc_blockcount - 1; in xchk_refcountbt_xref_rmap()
317 if (irec->rc_refcount != refchk.seen) { in xchk_refcountbt_xref_rmap()
318 trace_xchk_refcount_incorrect(sc->sa.pag, irec, refchk.seen); in xchk_refcountbt_xref_rmap()
333 const struct xfs_refcount_irec *irec) in xchk_refcountbt_xref() argument
338 xchk_xref_is_used_space(sc, irec->rc_startblock, irec->rc_blockcount); in xchk_refcountbt_xref()
[all …]
H A Dalloc.c99 const struct xfs_alloc_rec_incore *irec) in xchk_allocbt_xref() argument
101 xfs_agblock_t agbno = irec->ar_startblock; in xchk_allocbt_xref()
102 xfs_extlen_t len = irec->ar_blockcount; in xchk_allocbt_xref()
119 const struct xfs_alloc_rec_incore *irec) in xchk_allocbt_mergeable() argument
125 ca->prev.ar_startblock + ca->prev.ar_blockcount == irec->ar_startblock && in xchk_allocbt_mergeable()
126 ca->prev.ar_blockcount + irec->ar_blockcount < (uint32_t)~0U) in xchk_allocbt_mergeable()
129 memcpy(&ca->prev, irec, sizeof(*irec)); in xchk_allocbt_mergeable()
138 struct xfs_alloc_rec_incore irec; in xchk_allocbt_rec() local
141 xfs_alloc_btrec_to_irec(rec, &irec); in xchk_allocbt_rec()
142 if (xfs_alloc_check_irec(to_perag(bs->cur->bc_group), &irec) != NULL) { in xchk_allocbt_rec()
[all …]
H A Drtrefcount.c300 const struct xfs_refcount_irec *irec) in xchk_rtrefcountbt_xref_rmap() argument
304 .bno = irec->rc_startblock, in xchk_rtrefcountbt_xref_rmap()
305 .len = irec->rc_blockcount, in xchk_rtrefcountbt_xref_rmap()
306 .refcount = irec->rc_refcount, in xchk_rtrefcountbt_xref_rmap()
320 low.rm_startblock = irec->rc_startblock; in xchk_rtrefcountbt_xref_rmap()
322 high.rm_startblock = irec->rc_startblock + irec->rc_blockcount - 1; in xchk_rtrefcountbt_xref_rmap()
331 if (irec->rc_refcount != refchk.seen) in xchk_rtrefcountbt_xref_rmap()
345 const struct xfs_refcount_irec *irec) in xchk_rtrefcountbt_xref() argument
351 xfs_rgbno_to_rtb(sc->sr.rtg, irec->rc_startblock), in xchk_rtrefcountbt_xref()
352 irec->rc_blockcount); in xchk_rtrefcountbt_xref()
[all …]
H A Dcow_repair.c75 struct xfs_bmbt_irec irec; member
96 startoff = xc->irec.br_startoff + in xrep_cow_mark_file_range()
97 (startblock - xc->irec.br_startblock); in xrep_cow_mark_file_range()
126 xc->irec_startbno + xc->irec.br_blockcount) { in xrep_cow_trim_refcount()
128 (xc->irec_startbno + xc->irec.br_blockcount); in xrep_cow_trim_refcount()
218 if (rec_bno + rec_len > xc->irec_startbno + xc->irec.br_blockcount) { in xrep_cow_mark_missing_staging_rmap()
220 (xc->irec_startbno + xc->irec.br_blockcount); in xrep_cow_mark_missing_staging_rmap()
236 xfs_fsblock_t fsbno = xc->irec.br_startblock; in xrep_cow_debug_replacement()
237 xfs_extlen_t len = xc->irec.br_blockcount; in xrep_cow_debug_replacement()
268 agno = XFS_FSB_TO_AGNO(sc->mp, xc->irec.br_startblock); in xrep_cow_find_bad()
[all …]
H A Drefcount_repair.c169 struct xfs_refcount_irec irec = { in xrep_refc_stash() local
180 irec.rc_refcount = min_t(uint64_t, XFS_REFC_REFCOUNT_MAX, refcount); in xrep_refc_stash()
182 error = xrep_refc_check_ext(rr->sc, &irec); in xrep_refc_stash()
186 trace_xrep_refc_found(pag_group(sc->sa.pag), &irec); in xrep_refc_stash()
188 return xfarray_append(rr->refcount_records, &irec); in xrep_refc_stash()
286 const struct xfs_refcount_irec *irec) in xrep_refc_encode_startblock() argument
290 start = irec->rc_startblock & ~XFS_REFC_COWFLAG; in xrep_refc_encode_startblock()
291 if (irec->rc_domain == XFS_REFC_DOMAIN_COW) in xrep_refc_encode_startblock()
325 struct xfs_refcount_irec irec; in xrep_refc_sort_records() local
340 error = xfarray_load(rr->refcount_records, cur, &irec); in xrep_refc_sort_records()
[all …]
H A Dquota.c87 struct xfs_bmbt_irec irec; in xchk_quota_item_bmap() local
102 error = xfs_bmapi_read(sc->ip, offset, 1, &irec, &nmaps, 0); in xchk_quota_item_bmap()
111 if (!xfs_verify_fsbno(mp, irec.br_startblock)) in xchk_quota_item_bmap()
113 if (XFS_FSB_TO_DADDR(mp, irec.br_startblock) != dq->q_blkno) in xchk_quota_item_bmap()
115 if (!xfs_bmap_is_written_extent(&irec)) in xchk_quota_item_bmap()
265 struct xfs_bmbt_irec irec = { 0 }; in xchk_quota_data_fork() local
280 for_each_xfs_iext(ifp, &icur, &irec) { in xchk_quota_data_fork()
288 if (!xfs_bmap_is_written_extent(&irec) || in xchk_quota_data_fork()
289 irec.br_startoff > max_dqid_off || in xchk_quota_data_fork()
290 irec.br_startoff + irec.br_blockcount - 1 > max_dqid_off) { in xchk_quota_data_fork()
[all …]
H A Dtrace.h938 const struct xfs_refcount_irec *irec,
940 TP_ARGS(pag, irec, seen),
953 __entry->domain = irec->rc_domain;
954 __entry->startblock = irec->rc_startblock;
955 __entry->blockcount = irec->rc_blockcount;
956 __entry->refcount = irec->rc_refcount;
2198 struct xfs_bmbt_irec *irec),
2199 TP_ARGS(ip, whichfork, irec),
2213 __entry->lblk = irec->br_startoff;
2214 __entry->len = irec->br_blockcount;
[all …]
H A Dattr_repair.c980 struct xfs_bmbt_irec irec; in xrep_xattr_fork_remove() local
986 for_each_xfs_iext(ifp, &icur, &irec) { in xrep_xattr_fork_remove()
989 i++, irec.br_startoff, in xrep_xattr_fork_remove()
990 irec.br_startblock, irec.br_blockcount, in xrep_xattr_fork_remove()
991 irec.br_state); in xrep_xattr_fork_remove()
/linux/fs/xfs/libxfs/
H A Dxfs_refcount.h24 struct xfs_refcount_irec *irec, int *stat);
70 const struct xfs_refcount_irec *irec) in xfs_refcount_check_domain() argument
72 if (irec->rc_domain == XFS_REFC_DOMAIN_COW && irec->rc_refcount != 1) in xfs_refcount_check_domain()
74 if (irec->rc_domain == XFS_REFC_DOMAIN_SHARED && irec->rc_refcount < 2) in xfs_refcount_check_domain()
80 struct xfs_bmbt_irec *irec);
82 struct xfs_bmbt_irec *irec);
123 struct xfs_refcount_irec *irec);
125 const struct xfs_refcount_irec *irec);
127 const struct xfs_refcount_irec *irec);
129 struct xfs_refcount_irec *irec, int *stat);
H A Dxfs_refcount.c111 struct xfs_refcount_irec *irec) in xfs_refcount_btrec_to_irec() argument
118 irec->rc_domain = XFS_REFC_DOMAIN_COW; in xfs_refcount_btrec_to_irec()
120 irec->rc_domain = XFS_REFC_DOMAIN_SHARED; in xfs_refcount_btrec_to_irec()
123 irec->rc_startblock = start; in xfs_refcount_btrec_to_irec()
124 irec->rc_blockcount = be32_to_cpu(rec->refc.rc_blockcount); in xfs_refcount_btrec_to_irec()
125 irec->rc_refcount = be32_to_cpu(rec->refc.rc_refcount); in xfs_refcount_btrec_to_irec()
132 const struct xfs_refcount_irec *irec) in xfs_refcount_check_irec() argument
134 if (irec->rc_blockcount == 0 || irec->rc_blockcount > XFS_REFC_LEN_MAX) in xfs_refcount_check_irec()
137 if (!xfs_refcount_check_domain(irec)) in xfs_refcount_check_irec()
141 if (!xfs_verify_agbext(pag, irec->rc_startblock, irec->rc_blockcount)) in xfs_refcount_check_irec()
[all …]
H A Dxfs_exchmaps.c112 const struct xfs_bmbt_irec *irec) in xmi_advance() argument
114 xmi->xmi_startoff1 += irec->br_blockcount; in xmi_advance()
115 xmi->xmi_startoff2 += irec->br_blockcount; in xmi_advance()
116 xmi->xmi_blockcount -= irec->br_blockcount; in xmi_advance()
194 struct xfs_bmbt_irec *irec) in xfs_exchmaps_can_skip_mapping() argument
203 if (xfs_bmap_is_written_extent(irec)) in xfs_exchmaps_can_skip_mapping()
226 if (!xfs_bmap_is_real_extent(irec)) in xfs_exchmaps_can_skip_mapping()
237 if (!isaligned_64(irec->br_startoff, mp->m_sb.sb_rextsize)) { in xfs_exchmaps_can_skip_mapping()
240 new_end = roundup_64(irec->br_startoff, mp->m_sb.sb_rextsize); in xfs_exchmaps_can_skip_mapping()
241 irec->br_blockcount = min(irec->br_blockcount, in xfs_exchmaps_can_skip_mapping()
[all …]
H A Dxfs_ialloc.h85 uint8_t xfs_inobt_rec_freecount(const struct xfs_inobt_rec_incore *irec);
99 struct xfs_inobt_rec_incore *irec);
101 const struct xfs_inobt_rec_incore *irec);
H A Dxfs_rtrefcount_btree.c141 const struct xfs_refcount_irec *irec = &cur->bc_rec.rc; in xfs_rtrefcountbt_init_rec_from_cur() local
144 start = xfs_refcount_encode_startblock(irec->rc_startblock, in xfs_rtrefcountbt_init_rec_from_cur()
145 irec->rc_domain); in xfs_rtrefcountbt_init_rec_from_cur()
165 const struct xfs_refcount_irec *irec = &cur->bc_rec.rc; in xfs_rtrefcountbt_cmp_key_with_cur() local
168 start = xfs_refcount_encode_startblock(irec->rc_startblock, in xfs_rtrefcountbt_cmp_key_with_cur()
169 irec->rc_domain); in xfs_rtrefcountbt_cmp_key_with_cur()
H A Dxfs_alloc.h188 struct xfs_alloc_rec_incore *irec);
190 const struct xfs_alloc_rec_incore *irec);
H A Dxfs_ialloc_btree.h57 uint64_t xfs_inobt_irec_to_allocmask(const struct xfs_inobt_rec_incore *irec);
/linux/fs/xfs/
H A Dxfs_iwalk.c100 struct xfs_inobt_rec_incore *irec) in xfs_iwalk_ichunk_ra() argument
107 agbno = XFS_AGINO_TO_AGBNO(mp, irec->ir_startino); in xfs_iwalk_ichunk_ra()
114 if (imask & ~irec->ir_free) { in xfs_iwalk_ichunk_ra()
133 struct xfs_inobt_rec_incore *irec) /* btree record */ in xfs_iwalk_adjust_start() argument
137 idx = agino - irec->ir_startino; in xfs_iwalk_adjust_start()
139 irec->ir_free |= xfs_inobt_maskn(0, idx); in xfs_iwalk_adjust_start()
140 irec->ir_freecount = hweight64(irec->ir_free); in xfs_iwalk_adjust_start()
183 struct xfs_inobt_rec_incore *irec = &iwag->recs[i]; 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()
[all …]
H A Dxfs_zone_gc.c291 const struct xfs_rmap_irec *irec, in xfs_zone_gc_query_cb() argument
296 ASSERT(!XFS_RMAP_NON_INODE_OWNER(irec->rm_owner)); in xfs_zone_gc_query_cb()
297 ASSERT(!xfs_is_sb_inum(cur->bc_mp, irec->rm_owner)); in xfs_zone_gc_query_cb()
298 ASSERT(!(irec->rm_flags & (XFS_RMAP_ATTR_FORK | XFS_RMAP_BMBT_BLOCK))); in xfs_zone_gc_query_cb()
300 iter->recs[iter->rec_count] = *irec; in xfs_zone_gc_query_cb()
303 irec->rm_startblock + irec->rm_blockcount; in xfs_zone_gc_query_cb()
394 struct xfs_rmap_irec *irec; in xfs_zone_gc_iter_irec() local
406 irec = &iter->recs[iter->rec_idx]; in xfs_zone_gc_iter_irec()
407 error = xfs_iget(mp, NULL, irec->rm_owner, in xfs_zone_gc_iter_irec()
426 *chunk_rec = *irec; in xfs_zone_gc_iter_irec()
[all …]
H A Dxfs_reflink.c139 const struct xfs_bmbt_irec *irec, in xfs_reflink_find_shared() argument
150 pag = xfs_perag_get(mp, XFS_FSB_TO_AGNO(mp, irec->br_startblock)); in xfs_reflink_find_shared()
151 orig_bno = XFS_FSB_TO_AGBNO(mp, irec->br_startblock); in xfs_reflink_find_shared()
158 error = xfs_refcount_find_shared(cur, orig_bno, irec->br_blockcount, in xfs_reflink_find_shared()
183 const struct xfs_bmbt_irec *irec, in xfs_reflink_find_rtshared() argument
201 orig_bno = xfs_rtb_to_rgbno(mp, irec->br_startblock); in xfs_reflink_find_rtshared()
202 rtg = xfs_rtgroup_get(mp, xfs_rtb_to_rgno(mp, irec->br_startblock)); in xfs_reflink_find_rtshared()
206 error = xfs_refcount_find_shared(cur, orig_bno, irec->br_blockcount, in xfs_reflink_find_rtshared()
230 struct xfs_bmbt_irec *irec, in xfs_reflink_trim_around_shared() argument
238 if (!xfs_is_reflink_inode(ip) || !xfs_bmap_is_written_extent(irec)) { in xfs_reflink_trim_around_shared()
[all …]
H A Dxfs_bmap_util.c1281 struct xfs_bmbt_irec irec; in xfs_swap_extent_rmap() local
1328 tirec.br_blockcount, &irec, in xfs_swap_extent_rmap()
1333 ASSERT(tirec.br_startoff == irec.br_startoff); in xfs_swap_extent_rmap()
1334 trace_xfs_swap_extent_rmap_remap_piece(ip, &irec); in xfs_swap_extent_rmap()
1340 irec.br_blockcount); in xfs_swap_extent_rmap()
1351 if (xfs_bmap_is_real_extent(&irec)) { in xfs_swap_extent_rmap()
1363 xfs_bmap_unmap_extent(tp, ip, XFS_DATA_FORK, &irec); in xfs_swap_extent_rmap()
1369 xfs_bmap_map_extent(tp, tip, XFS_DATA_FORK, &irec); in xfs_swap_extent_rmap()
H A Dxfs_reflink.h29 struct xfs_bmbt_irec *irec, bool *shared);
H A Dxfs_trace.h1812 int whichfork, struct xfs_bmbt_irec *irec),
1813 TP_ARGS(ip, offset, count, whichfork, irec),
1832 __entry->startoff = irec ? irec->br_startoff : 0;
1833 __entry->startblock = irec ? irec->br_startblock : 0;
1834 __entry->blockcount = irec ? irec->br_blockcount : 0;
1852 int whichfork, struct xfs_bmbt_irec *irec), \
1853 TP_ARGS(ip, offset, count, whichfork, irec))
3639 TP_PROTO(struct xfs_btree_cur *cur, struct xfs_refcount_irec *irec),
3640 TP_ARGS(cur, irec),
3654 __entry->domain = irec->rc_domain;
[all …]
/linux/fs/ext4/
H A Dfsmap.c247 struct ext4_fsmap irec; in ext4_getfsmap_datadev_helper() local
292 irec.fmr_device = 0; in ext4_getfsmap_datadev_helper()
293 irec.fmr_physical = fsb; in ext4_getfsmap_datadev_helper()
294 irec.fmr_length = fslen; in ext4_getfsmap_datadev_helper()
295 irec.fmr_owner = EXT4_FMR_OWN_FREE; in ext4_getfsmap_datadev_helper()
296 irec.fmr_flags = 0; in ext4_getfsmap_datadev_helper()
299 if (ext4_fsmap_next_pblk(&irec) == in ext4_getfsmap_datadev_helper()
301 info->gfi_lastfree = irec; in ext4_getfsmap_datadev_helper()
306 return ext4_getfsmap_helper(sb, info, &irec); in ext4_getfsmap_datadev_helper()
314 struct ext4_fsmap irec; in ext4_getfsmap_logdev() local
[all …]

12