Home
last modified time | relevance | path

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

12

/linux/fs/xfs/scrub/
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 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.c74 struct xfs_bmbt_irec irec; member
101 startoff = xc->irec.br_startoff + in xrep_cow_mark_file_range()
102 (startblock - xc->irec.br_startblock); in xrep_cow_mark_file_range()
131 xc->irec_startbno + xc->irec.br_blockcount) { in xrep_cow_trim_refcount()
133 (xc->irec_startbno + xc->irec.br_blockcount); in xrep_cow_trim_refcount()
223 if (rec_bno + rec_len > xc->irec_startbno + xc->irec.br_blockcount) { in xrep_cow_mark_missing_staging_rmap()
225 (xc->irec_startbno + xc->irec.br_blockcount); in xrep_cow_mark_missing_staging_rmap()
250 agno = XFS_FSB_TO_AGNO(sc->mp, xc->irec.br_startblock); in xrep_cow_find_bad()
251 xc->irec_startbno = XFS_FSB_TO_AGBNO(sc->mp, xc->irec.br_startblock); in xrep_cow_find_bad()
263 rc_high.rc_startblock = xc->irec_startbno + xc->irec.br_blockcount - 1; in xrep_cow_find_bad()
[all …]
H A Dbmap_repair.c137 struct xfs_bmbt_irec irec = { in xrep_bmap_from_rmap() local
160 irec.br_blockcount = min_t(xfs_filblks_t, blockcount, in xrep_bmap_from_rmap()
163 fa = xfs_bmap_validate_extent(sc->ip, rb->whichfork, &irec); in xrep_bmap_from_rmap()
167 xfs_bmbt_disk_set_all(&rbe, &irec); in xrep_bmap_from_rmap()
169 trace_xrep_bmap_found(sc->ip, rb->whichfork, &irec); in xrep_bmap_from_rmap()
180 irec.br_startblock += irec.br_blockcount; in xrep_bmap_from_rmap()
181 irec.br_startoff += irec.br_blockcount; in xrep_bmap_from_rmap()
182 blockcount -= irec.br_blockcount; in xrep_bmap_from_rmap()
322 struct xfs_bmbt_irec irec; in xrep_bmap_sort_records() local
342 xfs_bmbt_disk_get_all(&rec, &irec); in xrep_bmap_sort_records()
[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 Drtrefcount_repair.c166 struct xfs_refcount_irec irec = { in xrep_rtrefc_stash() local
177 irec.rc_refcount = min_t(uint64_t, XFS_REFC_REFCOUNT_MAX, refcount); in xrep_rtrefc_stash()
179 error = xrep_rtrefc_check_ext(rr->sc, &irec); in xrep_rtrefc_stash()
183 trace_xrep_refc_found(rtg_group(rr->sc->sr.rtg), &irec); in xrep_rtrefc_stash()
185 return xfarray_append(rr->refcount_records, &irec); in xrep_rtrefc_stash()
271 const struct xfs_refcount_irec *irec) in xrep_rtrefc_encode_startblock() argument
275 start = irec->rc_startblock & ~XFS_REFC_COWFLAG; in xrep_rtrefc_encode_startblock()
276 if (irec->rc_domain == XFS_REFC_DOMAIN_COW) in xrep_rtrefc_encode_startblock()
313 struct xfs_refcount_irec irec; in xrep_rtrefc_sort_records() local
328 error = xfarray_load(rr->refcount_records, cur, &irec); in xrep_rtrefc_sort_records()
[all …]
H A Dialloc_repair.c526 struct xfs_inobt_rec_incore *irec = &cur->bc_rec.i; in xrep_fibt_get_records() local
535 ri->array_cur++, irec); in xrep_fibt_get_records()
536 } while (error == 0 && xfs_inobt_rec_freecount(irec) == 0); in xrep_fibt_get_records()
556 struct xfs_inobt_rec_incore *irec = &cur->bc_rec.i; in xrep_ibt_get_records() local
563 error = xfarray_load(ri->inode_records, ri->array_cur++, irec); in xrep_ibt_get_records()
603 struct xfs_inobt_rec_incore irec; in xrep_ibt_check_overlap() local
612 error = xfarray_load(ri->inode_records, cur, &irec); in xrep_ibt_check_overlap()
616 if (irec.ir_startino < next_agino) in xrep_ibt_check_overlap()
619 next_agino = irec.ir_startino + XFS_INODES_PER_CHUNK; in xrep_ibt_check_overlap()
H A Drmap_repair.c675 struct xfs_inobt_rec_incore irec; in xrep_rmap_walk_inobt() local
690 xfs_inobt_btrec_to_irec(mp, rec, &irec); in xrep_rmap_walk_inobt()
691 if (xfs_inobt_check_irec(to_perag(cur->bc_group), &irec) != NULL) in xrep_rmap_walk_inobt()
694 agino = irec.ir_startino; in xrep_rmap_walk_inobt()
697 if (!xfs_inobt_issparse(irec.ir_holemask)) { in xrep_rmap_walk_inobt()
709 for (i = 0, agino = irec.ir_startino; in xrep_rmap_walk_inobt()
713 if (irec.ir_holemask & (1 << i)) in xrep_rmap_walk_inobt()
787 const struct xfs_refcount_irec *irec, in xrep_rmap_walk_cowblocks() argument
792 if (!xfs_refcount_check_domain(irec) || in xrep_rmap_walk_cowblocks()
793 irec->rc_domain != XFS_REFC_DOMAIN_COW) in xrep_rmap_walk_cowblocks()
[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;
2206 struct xfs_bmbt_irec *irec),
2207 TP_ARGS(ip, whichfork, irec),
2221 __entry->lblk = irec->br_startoff;
2222 __entry->len = irec->br_blockcount;
[all …]
H A Drtrmap_repair.c465 const struct xfs_refcount_irec *irec, in xrep_rtrmap_walk_cowblocks() argument
470 if (!xfs_refcount_check_domain(irec) || in xrep_rtrmap_walk_cowblocks()
471 irec->rc_domain != XFS_REFC_DOMAIN_COW) in xrep_rtrmap_walk_cowblocks()
474 return xrgb_bitmap_set(bitmap, irec->rc_startblock, in xrep_rtrmap_walk_cowblocks()
475 irec->rc_blockcount); in xrep_rtrmap_walk_cowblocks()
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_rmap.h52 const struct xfs_rmap_irec *irec) in xfs_rmap_irec_offset_pack() argument
56 x = XFS_RMAP_OFF(irec->rm_offset); in xfs_rmap_irec_offset_pack()
57 if (irec->rm_flags & XFS_RMAP_ATTR_FORK) in xfs_rmap_irec_offset_pack()
59 if (irec->rm_flags & XFS_RMAP_BMBT_BLOCK) in xfs_rmap_irec_offset_pack()
61 if (irec->rm_flags & XFS_RMAP_UNWRITTEN) in xfs_rmap_irec_offset_pack()
69 struct xfs_rmap_irec *irec) in xfs_rmap_irec_offset_unpack() argument
74 irec->rm_offset = XFS_RMAP_OFF(offset); in xfs_rmap_irec_offset_unpack()
75 irec->rm_flags = 0; in xfs_rmap_irec_offset_unpack()
77 irec->rm_flags |= XFS_RMAP_ATTR_FORK; in xfs_rmap_irec_offset_unpack()
79 irec->rm_flags |= XFS_RMAP_BMBT_BLOCK; in xfs_rmap_irec_offset_unpack()
[all …]
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_ialloc.c57 xfs_inobt_rec_incore_t *irec) /* btree record */ in xfs_inobt_update() argument
61 rec.inobt.ir_startino = cpu_to_be32(irec->ir_startino); in xfs_inobt_update()
63 rec.inobt.ir_u.sp.ir_holemask = cpu_to_be16(irec->ir_holemask); in xfs_inobt_update()
64 rec.inobt.ir_u.sp.ir_count = irec->ir_count; in xfs_inobt_update()
65 rec.inobt.ir_u.sp.ir_freecount = irec->ir_freecount; in xfs_inobt_update()
68 rec.inobt.ir_u.f.ir_freecount = cpu_to_be32(irec->ir_freecount); in xfs_inobt_update()
70 rec.inobt.ir_free = cpu_to_be64(irec->ir_free); in xfs_inobt_update()
79 struct xfs_inobt_rec_incore *irec) in xfs_inobt_btrec_to_irec() argument
81 irec->ir_startino = be32_to_cpu(rec->inobt.ir_startino); in xfs_inobt_btrec_to_irec()
83 irec->ir_holemask = be16_to_cpu(rec->inobt.ir_u.sp.ir_holemask); in xfs_inobt_btrec_to_irec()
[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_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.c269 const struct xfs_rmap_irec *irec, in xfs_zone_gc_query_cb() argument
274 ASSERT(!XFS_RMAP_NON_INODE_OWNER(irec->rm_owner)); in xfs_zone_gc_query_cb()
275 ASSERT(!xfs_is_sb_inum(cur->bc_mp, irec->rm_owner)); in xfs_zone_gc_query_cb()
276 ASSERT(!(irec->rm_flags & (XFS_RMAP_ATTR_FORK | XFS_RMAP_BMBT_BLOCK))); in xfs_zone_gc_query_cb()
278 iter->recs[iter->rec_count] = *irec; in xfs_zone_gc_query_cb()
281 irec->rm_startblock + irec->rm_blockcount; in xfs_zone_gc_query_cb()
372 struct xfs_rmap_irec *irec; in xfs_zone_gc_iter_next() local
387 irec = &iter->recs[iter->rec_idx]; in xfs_zone_gc_iter_next()
388 error = xfs_iget(mp, NULL, irec->rm_owner, in xfs_zone_gc_iter_next()
407 *chunk_rec = *irec; in xfs_zone_gc_iter_next()
[all …]
H A Dxfs_itable.c412 const struct xfs_inobt_rec_incore *irec, in xfs_inumbers_walk() argument
416 .xi_startino = XFS_AGINO_TO_INO(mp, agno, irec->ir_startino), in xfs_inumbers_walk()
417 .xi_alloccount = irec->ir_count - irec->ir_freecount, in xfs_inumbers_walk()
418 .xi_allocmask = ~irec->ir_free, in xfs_inumbers_walk()
428 ic->breq->startino = XFS_AGINO_TO_INO(mp, agno, irec->ir_startino) + in xfs_inumbers_walk()
H A Dxfs_reflink.h29 struct xfs_bmbt_irec *irec, bool *shared);
H A Dxfs_fsmap.c440 struct xfs_rmap_irec *irec, in xfs_getfsmap_set_irec_flags() argument
443 irec->rm_flags = 0; in xfs_getfsmap_set_irec_flags()
445 irec->rm_flags |= XFS_RMAP_ATTR_FORK; in xfs_getfsmap_set_irec_flags()
447 irec->rm_flags |= XFS_RMAP_BMBT_BLOCK; in xfs_getfsmap_set_irec_flags()
449 irec->rm_flags |= XFS_RMAP_UNWRITTEN; in xfs_getfsmap_set_irec_flags()
/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