| /linux/fs/xfs/scrub/ |
| H A D | bmap.c | 140 int whichfork; member 158 if (xfs_ifork_is_realtime(info->sc->ip, info->whichfork)) in xchk_bmap_get_rmap() 164 if (info->whichfork == XFS_ATTR_FORK) in xchk_bmap_get_rmap() 173 if (info->whichfork == XFS_COW_FORK) in xchk_bmap_get_rmap() 194 xchk_fblock_xref_set_corrupt(info->sc, info->whichfork, in xchk_bmap_get_rmap() 222 xchk_fblock_xref_set_corrupt(info->sc, info->whichfork, in xchk_bmap_xref_rmap() 227 xchk_fblock_xref_set_corrupt(info->sc, info->whichfork, in xchk_bmap_xref_rmap() 232 xchk_fblock_xref_set_corrupt(info->sc, info->whichfork, in xchk_bmap_xref_rmap() 237 xchk_fblock_xref_set_corrupt(info->sc, info->whichfork, in xchk_bmap_xref_rmap() 242 xchk_fblock_xref_set_corrupt(info->sc, info->whichfork, in xchk_bmap_xref_rmap() [all …]
|
| H A D | bmap_repair.c | 87 int whichfork; member 163 fa = xfs_bmap_validate_extent(sc->ip, rb->whichfork, &irec); in xrep_bmap_from_rmap() 169 trace_xrep_bmap_found(sc->ip, rb->whichfork, &irec); in xrep_bmap_from_rmap() 269 if (rb->whichfork == XFS_DATA_FORK && in xrep_bmap_walk_rmap() 272 if (rb->whichfork == XFS_ATTR_FORK && in xrep_bmap_walk_rmap() 433 if (rb->whichfork == XFS_DATA_FORK && in xrep_bmap_walk_rtrmap() 436 if (rb->whichfork == XFS_ATTR_FORK && in xrep_bmap_walk_rtrmap() 488 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, rb->whichfork); in xrep_bmap_find_delalloc() 495 if (rb->whichfork == XFS_ATTR_FORK || ip->i_delayed_blks == 0) in xrep_bmap_find_delalloc() 504 trace_xrep_bmap_found(ip, rb->whichfork, &irec); in xrep_bmap_find_delalloc() [all …]
|
| H A D | tempfile.c | 608 int whichfork, in xrep_tempexch_prep_request() argument 618 if (whichfork == XFS_COW_FORK) { in xrep_tempexch_prep_request() 624 if (!xfs_ifork_ptr(sc->ip, whichfork) || in xrep_tempexch_prep_request() 625 !xfs_ifork_ptr(sc->tempip, whichfork)) { in xrep_tempexch_prep_request() 626 ASSERT(xfs_ifork_ptr(sc->ip, whichfork) != NULL); in xrep_tempexch_prep_request() 627 ASSERT(xfs_ifork_ptr(sc->tempip, whichfork) != NULL); in xrep_tempexch_prep_request() 636 switch (whichfork) { in xrep_tempexch_prep_request() 664 int whichfork = xfs_exchmaps_reqfork(req); in xrep_tempexch_estimate() local 672 ifp = xfs_ifork_ptr(sc->ip, whichfork); in xrep_tempexch_estimate() 676 tifp = xfs_ifork_ptr(sc->tempip, whichfork); in xrep_tempexch_estimate() [all …]
|
| H A D | common.c | 156 int whichfork, in __xchk_fblock_process_error() argument 176 trace_xchk_file_op_error(sc, whichfork, offset, *error, in __xchk_fblock_process_error() 189 trace_xchk_file_op_error(sc, whichfork, offset, *error, in __xchk_fblock_process_error() 199 int whichfork, in xchk_fblock_process_error() argument 203 return __xchk_fblock_process_error(sc, whichfork, offset, error, in xchk_fblock_process_error() 210 int whichfork, in xchk_fblock_xref_process_error() argument 214 return __xchk_fblock_process_error(sc, whichfork, offset, error, in xchk_fblock_xref_process_error() 324 int whichfork, in xchk_fblock_set_corrupt() argument 328 trace_xchk_fblock_error(sc, whichfork, offset, __return_address); in xchk_fblock_set_corrupt() 335 int whichfork, in xchk_fblock_xref_set_corrupt() argument [all …]
|
| H A D | common.h | 17 bool xchk_fblock_process_error(struct xfs_scrub *sc, int whichfork, 23 int whichfork, xfs_fileoff_t offset, int *error); 33 void xchk_fblock_set_corrupt(struct xfs_scrub *sc, int whichfork, 45 int whichfork, xfs_fileoff_t offset); 48 void xchk_fblock_set_warning(struct xfs_scrub *sc, int whichfork, 265 int xchk_inode_count_blocks(struct xfs_scrub *sc, int whichfork,
|
| H A D | dabtree.c | 55 trace_xchk_file_op_error(sc, ds->dargs.whichfork, in xchk_da_process_error() 77 trace_xchk_fblock_error(sc, ds->dargs.whichfork, in xchk_da_set_corrupt() 92 trace_xchk_fblock_preen(sc, ds->dargs.whichfork, in xchk_da_set_preen() 363 XFS_DABUF_MAP_HOLE_OK, &blk->bp, dargs->whichfork, in xchk_da_btree_block() 375 if (ds->dargs.whichfork == XFS_DATA_FORK && level == 0 && in xchk_da_btree_block() 498 int whichfork, in xchk_da_btree() argument 511 if (!xfs_ifork_has_extents(xfs_ifork_ptr(sc->ip, whichfork))) in xchk_da_btree() 519 ds->dargs.whichfork = whichfork; in xchk_da_btree() 526 if (whichfork == XFS_ATTR_FORK) { in xchk_da_btree()
|
| H A D | tempexch.h | 14 int xrep_tempexch_trans_reserve(struct xfs_scrub *sc, int whichfork, 16 int xrep_tempexch_trans_alloc(struct xfs_scrub *sc, int whichfork,
|
| H A D | reap.c | 112 int whichfork; member 1252 xfs_rmap_ino_owner(&oinfo, rs->ip->i_ino, rs->whichfork, in xreap_bmapi_select() 1322 int bmap_flags = xfs_bmapi_aflag(rs->whichfork); in xreap_bmapi_binval() 1449 xfs_bmap_unmap_extent(sc->tp, rs->ip, rs->whichfork, imap); in xrep_reap_bmapi_iter() 1452 xfs_rmap_unmap_extent(sc->tp, rs->ip, rs->whichfork, imap); in xrep_reap_bmapi_iter() 1482 xfs_bmap_unmap_extent(sc->tp, rs->ip, rs->whichfork, imap); in xrep_reap_bmapi_iter() 1605 trace_xreap_ifork_extent(sc, rs->ip, rs->whichfork, imap); in xreap_ifork_extent() 1646 int whichfork) in xrep_reap_ifork() argument 1651 .whichfork = whichfork, in xrep_reap_ifork() 1654 int bmap_flags = xfs_bmapi_aflag(whichfork); in xrep_reap_ifork() [all …]
|
| H A D | rmap_repair.c | 316 int whichfork; member 351 if (rf->whichfork == XFS_ATTR_FORK) in xrep_rmap_visit_bmbt() 423 xfs_rmap_ino_bmbt_owner(&oinfo, rf->accum.rm_owner, rf->whichfork); in xrep_rmap_scan_iroot_btree() 452 ifp = xfs_ifork_ptr(ip, rf->whichfork); in xrep_rmap_scan_bmbt() 453 cur = xfs_bmbt_init_cursor(rr->sc->mp, rr->sc->tp, ip, rf->whichfork); in xrep_rmap_scan_bmbt() 455 if (!xfs_ifork_is_realtime(ip, rf->whichfork) && in xrep_rmap_scan_bmbt() 513 if (rf->whichfork != XFS_DATA_FORK) in xrep_rmap_scan_meta_btree() 570 int whichfork) in xrep_rmap_scan_ifork() argument 575 .whichfork = whichfork, in xrep_rmap_scan_ifork() 577 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xrep_rmap_scan_ifork() [all …]
|
| /linux/fs/xfs/libxfs/ |
| H A D | xfs_inode_fork.c | 38 int whichfork, in xfs_init_local_fork() argument 42 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_init_local_fork() 79 int whichfork, in xfs_iformat_local() argument 87 if (unlikely(size > XFS_DFORK_SIZE(dip, ip->i_mount, whichfork))) { in xfs_iformat_local() 91 XFS_DFORK_SIZE(dip, ip->i_mount, whichfork)); in xfs_iformat_local() 99 xfs_init_local_fork(ip, whichfork, XFS_DFORK_PTR(dip, whichfork), size); in xfs_iformat_local() 111 int whichfork) in xfs_iformat_extents() argument 114 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_iformat_extents() 115 int state = xfs_bmap_fork_to_state(whichfork); in xfs_iformat_extents() 116 xfs_extnum_t nex = xfs_dfork_nextents(dip, whichfork); in xfs_iformat_extents() [all …]
|
| H A D | xfs_bmap.c | 58 int whichfork) /* data or attr fork */ in xfs_bmap_compute_maxlevels() argument 81 whichfork); in xfs_bmap_compute_maxlevels() 82 if (whichfork == XFS_DATA_FORK) in xfs_bmap_compute_maxlevels() 97 mp->m_bm_maxlevels[whichfork] = level; in xfs_bmap_compute_maxlevels() 98 ASSERT(mp->m_bm_maxlevels[whichfork] <= xfs_bmbt_maxlevels_ondisk()); in xfs_bmap_compute_maxlevels() 134 static inline bool xfs_bmap_needs_btree(struct xfs_inode *ip, int whichfork) in xfs_bmap_needs_btree() argument 136 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_needs_btree() 138 return whichfork != XFS_COW_FORK && in xfs_bmap_needs_btree() 140 ifp->if_nextents > XFS_IFORK_MAXEXT(ip, whichfork); in xfs_bmap_needs_btree() 146 static inline bool xfs_bmap_wants_extents(struct xfs_inode *ip, int whichfork) in xfs_bmap_wants_extents() argument [all …]
|
| H A D | xfs_bmap.h | 186 struct xfs_inode *ip, int whichfork); 188 xfs_extlen_t total, int *logflagsp, int whichfork, 193 void xfs_bmap_compute_maxlevels(struct xfs_mount *mp, int whichfork); 195 xfs_extlen_t len, xfs_fileoff_t *unused, int whichfork); 197 xfs_fileoff_t *last_block, int whichfork); 199 int whichfork); 209 void xfs_bmap_del_extent_delay(struct xfs_inode *ip, int whichfork, 226 int xfs_bmapi_convert_delalloc(struct xfs_inode *ip, int whichfork, 229 struct xfs_inode *ip, int whichfork, 258 int whichfork, struct xfs_bmbt_irec *imap); [all …]
|
| H A D | xfs_bmap_btree.c | 187 cur->bc_ino.ip, cur->bc_ino.whichfork); in xfs_bmbt_dup_cursor() 221 cur->bc_ino.whichfork); in xfs_bmbt_alloc_block() 235 cur->bc_ino.whichfork); in xfs_bmbt_alloc_block() 283 xfs_rmap_ino_bmbt_owner(&oinfo, ip->i_ino, cur->bc_ino.whichfork); in xfs_bmbt_free_block() 543 int whichfork, in xfs_bmap_broot_realloc() argument 547 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_broot_realloc() 585 xfs_inode_fork_size(ip, whichfork)); in xfs_bmap_broot_realloc() 604 xfs_inode_fork_size(ip, whichfork)); in xfs_bmap_broot_realloc() 613 return xfs_bmap_broot_realloc(cur->bc_ino.ip, cur->bc_ino.whichfork, in xfs_bmbt_broot_realloc() 657 int whichfork) in xfs_bmbt_init_cursor() argument [all …]
|
| H A D | xfs_inode_fork.h | 103 int whichfork) in xfs_iext_max_nextents() argument 105 switch (whichfork) { in xfs_iext_max_nextents() 146 int whichfork) in xfs_dfork_nextents() argument 148 switch (whichfork) { in xfs_dfork_nextents() 172 int whichfork); 181 void xfs_init_local_fork(struct xfs_inode *ip, int whichfork, 264 int whichfork, uint nr_to_add); 265 bool xfs_ifork_is_realtime(struct xfs_inode *ip, int whichfork);
|
| H A D | xfs_da_btree.h | 76 int whichfork; /* data or attribute fork */ member 178 int level, struct xfs_buf **bpp, int whichfork); 202 xfs_dablk_t bno, struct xfs_buf **bpp, int whichfork); 205 int whichfork); 217 xfs_dablk_t bno, struct xfs_buf **bp, int whichfork); 220 int whichfork, const struct xfs_buf_ops *ops); 222 unsigned int flags, int whichfork,
|
| H A D | xfs_rmap.h | 16 int whichfork) in xfs_rmap_ino_bmbt_owner() argument 21 if (whichfork == XFS_ATTR_FORK) in xfs_rmap_ino_bmbt_owner() 29 int whichfork, in xfs_rmap_ino_owner() argument 35 if (whichfork == XFS_ATTR_FORK) in xfs_rmap_ino_owner() 183 int whichfork, struct xfs_bmbt_irec *imap); 185 int whichfork, struct xfs_bmbt_irec *imap); 187 struct xfs_inode *ip, int whichfork,
|
| H A D | xfs_da_btree.c | 133 static inline int xfs_dabuf_nfsb(struct xfs_mount *mp, int whichfork) in xfs_dabuf_nfsb() argument 135 if (whichfork == XFS_DATA_FORK) in xfs_dabuf_nfsb() 403 int whichfork, in xfs_da3_node_set_type() argument 425 xfs_dirattr_mark_sick(dp, whichfork); in xfs_da3_node_set_type() 436 int whichfork) in xfs_da3_node_read() argument 440 error = xfs_da_read_buf(tp, dp, bno, 0, bpp, whichfork, in xfs_da3_node_read() 444 return xfs_da3_node_set_type(tp, dp, whichfork, *bpp); in xfs_da3_node_read() 453 int whichfork) in xfs_da3_node_read_mapped() argument 459 XFS_FSB_TO_BB(mp, xfs_dabuf_nfsb(mp, whichfork)), 0, in xfs_da3_node_read_mapped() 462 xfs_dirattr_mark_sick(dp, whichfork); in xfs_da3_node_read_mapped() [all …]
|
| H A D | xfs_exchmaps.c | 142 int whichfork = xfs_exchmaps_reqfork(req); in xfs_exchmaps_check_forks() local 145 ifp1 = xfs_ifork_ptr(req->ip1, whichfork); in xfs_exchmaps_check_forks() 146 ifp2 = xfs_ifork_ptr(req->ip2, whichfork); in xfs_exchmaps_check_forks() 387 int whichfork = xfs_exchmaps_whichfork(xmi); in xfs_exchmaps_one_step() local 392 xfs_bmap_unmap_extent(tp, xmi->xmi_ip1, whichfork, irec1); in xfs_exchmaps_one_step() 393 xfs_bmap_unmap_extent(tp, xmi->xmi_ip2, whichfork, irec2); in xfs_exchmaps_one_step() 402 xfs_bmap_map_extent(tp, xmi->xmi_ip1, whichfork, irec2); in xfs_exchmaps_one_step() 403 xfs_bmap_map_extent(tp, xmi->xmi_ip2, whichfork, irec1); in xfs_exchmaps_one_step() 406 if (whichfork == XFS_DATA_FORK) { in xfs_exchmaps_one_step() 430 .whichfork = XFS_ATTR_FORK, in xfs_exchmaps_attr_to_sf() [all …]
|
| H A D | xfs_bmap_btree.h | 42 int whichfork, xfs_ino_t new_owner, 48 struct xfs_trans *tp, int whichfork); 202 int whichfork, unsigned int new_numrecs);
|
| H A D | xfs_inode_buf.c | 379 int whichfork) in xfs_dinode_verify_fork() argument 384 uint32_t fork_size = XFS_DFORK_SIZE(dip, mp, whichfork); in xfs_dinode_verify_fork() 385 uint32_t fork_format = XFS_DFORK_FORMAT(dip, whichfork); in xfs_dinode_verify_fork() 387 di_nextents = xfs_dfork_nextents(dip, whichfork); in xfs_dinode_verify_fork() 393 if (whichfork == XFS_DATA_FORK) { in xfs_dinode_verify_fork() 436 if (S_ISREG(mode) && whichfork == XFS_DATA_FORK) in xfs_dinode_verify_fork() 442 if (di_nextents > XFS_DFORK_MAXEXT(dip, mp, whichfork)) in xfs_dinode_verify_fork() 448 whichfork); in xfs_dinode_verify_fork()
|
| /linux/fs/xfs/ |
| H A D | xfs_bmap_util.c | 100 int whichfork, in xfs_bmap_count_blocks() argument 105 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_count_blocks() 118 error = xfs_iread_extents(tp, ip, whichfork); in xfs_bmap_count_blocks() 122 cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork); in xfs_bmap_count_blocks() 256 int whichfork, lock, error = 0; in xfs_getbmap() local 281 whichfork = XFS_ATTR_FORK; in xfs_getbmap() 283 whichfork = XFS_COW_FORK; in xfs_getbmap() 285 whichfork = XFS_DATA_FORK; in xfs_getbmap() 288 switch (whichfork) { in xfs_getbmap() 301 if (!xfs_ifork_ptr(ip, whichfork)) in xfs_getbmap() [all …]
|
| H A D | xfs_bmap_util.h | 34 void xfs_bmap_punch_delalloc_range(struct xfs_inode *ip, int whichfork, 54 int whichfork, struct xfs_bmbt_irec *rec, 78 int whichfork, xfs_extnum_t *nextents,
|
| H A D | xfs_inode.h | 117 int whichfork) in xfs_ifork_ptr() argument 119 switch (whichfork) { in xfs_ifork_ptr() 157 int whichfork) in xfs_inode_fork_size() argument 159 switch (whichfork) { in xfs_inode_fork_size() 601 int whichfork, in xfs_itruncate_extents() argument 604 return xfs_itruncate_extents_flags(tpp, ip, whichfork, new_size, 0); in xfs_itruncate_extents() 670 bool xfs_ifork_zapped(const struct xfs_inode *ip, int whichfork);
|
| H A D | xfs_aops.c | 335 int whichfork; in xfs_map_blocks() local 373 whichfork = XFS_DATA_FORK; in xfs_map_blocks() 388 whichfork = XFS_COW_FORK; in xfs_map_blocks() 435 trace_xfs_map_blocks_found(ip, offset, count, whichfork, &imap); in xfs_map_blocks() 444 if (whichfork == XFS_COW_FORK) in xfs_map_blocks() 449 error = xfs_bmapi_convert_delalloc(ip, whichfork, offset, in xfs_map_blocks() 459 if (error == -EAGAIN && whichfork == XFS_COW_FORK && !retries++) in xfs_map_blocks() 470 if (whichfork != XFS_COW_FORK && cow_fsb != NULLFILEOFF) { in xfs_map_blocks() 479 trace_xfs_map_blocks_alloc(ip, offset, count, whichfork, &imap); in xfs_map_blocks()
|
| H A D | xfs_health.c | 672 int whichfork) in xfs_bmap_mark_sick() argument 676 switch (whichfork) { in xfs_bmap_mark_sick() 700 xfs_bmap_mark_sick(cur->bc_ino.ip, cur->bc_ino.whichfork); in xfs_btree_mark_sick() 716 int whichfork) in xfs_dirattr_mark_sick() argument 720 switch (whichfork) { in xfs_dirattr_mark_sick() 743 xfs_dirattr_mark_sick(args->dp, args->whichfork); in xfs_da_mark_sick()
|