Lines Matching refs:whichfork

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
148 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_wants_extents()
150 return whichfork != XFS_COW_FORK && in xfs_bmap_wants_extents()
152 ifp->if_nextents <= XFS_IFORK_MAXEXT(ip, whichfork); in xfs_bmap_wants_extents()
219 int whichfork) in xfs_bmap_forkoff_reset() argument
221 if (whichfork == XFS_ATTR_FORK && in xfs_bmap_forkoff_reset()
344 int whichfork) /* data or attr fork */ in xfs_bmap_check_leaf_extents() argument
347 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_check_leaf_extents()
544 #define xfs_bmap_check_leaf_extents(cur, ip, whichfork) do { } while (0) argument
565 int whichfork) /* data or attr fork */ in xfs_bmap_btree_to_extents() argument
567 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_btree_to_extents()
578 if (!xfs_bmap_wants_extents(ip, whichfork)) in xfs_bmap_btree_to_extents()
582 ASSERT(whichfork != XFS_COW_FORK); in xfs_bmap_btree_to_extents()
605 xfs_rmap_ino_bmbt_owner(&oinfo, ip->i_ino, whichfork); in xfs_bmap_btree_to_extents()
616 xfs_bmap_broot_realloc(ip, whichfork, 0); in xfs_bmap_btree_to_extents()
619 *logflagsp |= XFS_ILOG_CORE | xfs_ilog_fext(whichfork); in xfs_bmap_btree_to_extents()
634 int whichfork) /* data or attr fork */ in xfs_bmap_extents_to_btree() argument
652 ASSERT(whichfork != XFS_COW_FORK); in xfs_bmap_extents_to_btree()
653 ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_extents_to_btree()
660 block = xfs_bmap_broot_realloc(ip, whichfork, 1); in xfs_bmap_extents_to_btree()
669 cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork); in xfs_bmap_extents_to_btree()
679 xfs_rmap_ino_bmbt_owner(&args.oinfo, ip->i_ino, whichfork); in xfs_bmap_extents_to_btree()
740 *logflagsp = XFS_ILOG_CORE | xfs_ilog_fbroot(whichfork); in xfs_bmap_extents_to_btree()
746 xfs_bmap_broot_realloc(ip, whichfork, 0); in xfs_bmap_extents_to_btree()
764 int whichfork) in xfs_bmap_local_to_extents_empty() argument
766 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_local_to_extents_empty()
768 ASSERT(whichfork != XFS_COW_FORK); in xfs_bmap_local_to_extents_empty()
773 xfs_bmap_forkoff_reset(ip, whichfork); in xfs_bmap_local_to_extents_empty()
787 int whichfork, in xfs_bmap_local_to_extents() argument
806 ASSERT(!(S_ISREG(VFS_I(ip)->i_mode) && whichfork == XFS_DATA_FORK)); in xfs_bmap_local_to_extents()
807 ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_local_to_extents()
811 xfs_bmap_local_to_extents_empty(tp, ip, whichfork); in xfs_bmap_local_to_extents()
823 xfs_rmap_ino_owner(&args.oinfo, ip->i_ino, whichfork, 0); in xfs_bmap_local_to_extents()
856 xfs_idata_realloc(ip, -ifp->if_bytes, whichfork); in xfs_bmap_local_to_extents()
857 xfs_bmap_local_to_extents_empty(tp, ip, whichfork); in xfs_bmap_local_to_extents()
873 flags |= xfs_ilog_fext(whichfork); in xfs_bmap_local_to_extents()
977 dargs.whichfork = XFS_DATA_FORK; in xfs_bmap_add_attrfork_local()
1105 int whichfork, in xfs_bmap_complain_bad_rec() argument
1112 switch (whichfork) { in xfs_bmap_complain_bad_rec()
1145 int whichfork = cur->bc_ino.whichfork; in xfs_iread_bmbt_block() local
1146 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_iread_bmbt_block()
1157 xfs_bmap_mark_sick(ip, whichfork); in xfs_iread_bmbt_block()
1168 fa = xfs_bmap_validate_extent(ip, whichfork, &new); in xfs_iread_bmbt_block()
1173 xfs_bmap_mark_sick(ip, whichfork); in xfs_iread_bmbt_block()
1174 return xfs_bmap_complain_bad_rec(ip, whichfork, fa, in xfs_iread_bmbt_block()
1178 xfs_bmap_fork_to_state(whichfork)); in xfs_iread_bmbt_block()
1180 xfs_bmap_fork_to_state(whichfork), _THIS_IP_); in xfs_iread_bmbt_block()
1194 int whichfork) in xfs_iread_extents() argument
1197 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_iread_extents()
1209 cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork); in xfs_iread_extents()
1217 xfs_bmap_mark_sick(ip, whichfork); in xfs_iread_extents()
1231 xfs_bmap_mark_sick(ip, whichfork); in xfs_iread_extents()
1248 int whichfork) /* data or attr fork */ in xfs_bmap_first_unused() argument
1250 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_first_unused()
1264 error = xfs_iread_extents(tp, ip, whichfork); in xfs_bmap_first_unused()
1295 int whichfork) /* data or attr fork */ in xfs_bmap_last_before() argument
1297 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_last_before()
1311 xfs_bmap_mark_sick(ip, whichfork); in xfs_bmap_last_before()
1315 error = xfs_iread_extents(tp, ip, whichfork); in xfs_bmap_last_before()
1328 int whichfork, in xfs_bmap_last_extent() argument
1332 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_last_extent()
1336 error = xfs_iread_extents(tp, ip, whichfork); in xfs_bmap_last_extent()
1360 int whichfork) in xfs_bmap_isaeof() argument
1367 error = xfs_bmap_last_extent(NULL, bma->ip, whichfork, &rec, in xfs_bmap_isaeof()
1396 int whichfork) in xfs_bmap_last_offset() argument
1398 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_last_offset()
1409 xfs_bmap_mark_sick(ip, whichfork); in xfs_bmap_last_offset()
1413 error = xfs_bmap_last_extent(NULL, ip, whichfork, &rec, &is_empty); in xfs_bmap_last_offset()
1428 int whichfork, in xfs_bmap_same_rtgroup() argument
1434 if (xfs_ifork_is_realtime(ip, whichfork) && xfs_has_rtgroups(mp)) { in xfs_bmap_same_rtgroup()
1449 int whichfork) in xfs_bmap_add_extent_delay_real() argument
1452 struct xfs_ifork *ifp = xfs_ifork_ptr(bma->ip, whichfork); in xfs_bmap_add_extent_delay_real()
1460 uint32_t state = xfs_bmap_fork_to_state(whichfork); in xfs_bmap_add_extent_delay_real()
1467 ASSERT(whichfork != XFS_ATTR_FORK); in xfs_bmap_add_extent_delay_real()
1513 xfs_bmap_same_rtgroup(bma->ip, whichfork, &LEFT, new)) in xfs_bmap_add_extent_delay_real()
1538 xfs_bmap_same_rtgroup(bma->ip, whichfork, new, &RIGHT)) in xfs_bmap_add_extent_delay_real()
1766 if (xfs_bmap_needs_btree(bma->ip, whichfork)) { in xfs_bmap_add_extent_delay_real()
1768 &bma->cur, 1, &tmp_rval, whichfork); in xfs_bmap_add_extent_delay_real()
1857 if (xfs_bmap_needs_btree(bma->ip, whichfork)) { in xfs_bmap_add_extent_delay_real()
1859 &bma->cur, 1, &tmp_rval, whichfork); in xfs_bmap_add_extent_delay_real()
1946 if (xfs_bmap_needs_btree(bma->ip, whichfork)) { in xfs_bmap_add_extent_delay_real()
1948 &bma->cur, 1, &tmp_rval, whichfork); in xfs_bmap_add_extent_delay_real()
1973 xfs_rmap_map_extent(bma->tp, bma->ip, whichfork, new); in xfs_bmap_add_extent_delay_real()
1976 if (xfs_bmap_needs_btree(bma->ip, whichfork)) { in xfs_bmap_add_extent_delay_real()
1982 whichfork); in xfs_bmap_add_extent_delay_real()
2002 xfs_bmap_check_leaf_extents(bma->cur, bma->ip, whichfork); in xfs_bmap_add_extent_delay_real()
2004 if (whichfork != XFS_COW_FORK) in xfs_bmap_add_extent_delay_real()
2019 int whichfork, in xfs_bmap_add_extent_unwritten_real() argument
2033 uint32_t state = xfs_bmap_fork_to_state(whichfork); in xfs_bmap_add_extent_unwritten_real()
2040 ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_add_extent_unwritten_real()
2084 xfs_bmap_same_rtgroup(ip, whichfork, &LEFT, new)) in xfs_bmap_add_extent_unwritten_real()
2109 xfs_bmap_same_rtgroup(ip, whichfork, new, &RIGHT)) in xfs_bmap_add_extent_unwritten_real()
2543 xfs_rmap_convert_extent(mp, tp, ip, whichfork, new); in xfs_bmap_add_extent_unwritten_real()
2546 if (xfs_bmap_needs_btree(ip, whichfork)) { in xfs_bmap_add_extent_unwritten_real()
2551 &tmp_logflags, whichfork); in xfs_bmap_add_extent_unwritten_real()
2563 xfs_bmap_check_leaf_extents(*curp, ip, whichfork); in xfs_bmap_add_extent_unwritten_real()
2579 int whichfork, in xfs_bmap_add_extent_hole_real() argument
2586 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_add_extent_hole_real()
2594 uint32_t state = xfs_bmap_fork_to_state(whichfork); in xfs_bmap_add_extent_hole_real()
2630 xfs_bmap_same_rtgroup(ip, whichfork, &left, new)) in xfs_bmap_add_extent_hole_real()
2641 xfs_bmap_same_rtgroup(ip, whichfork, new, &right)) in xfs_bmap_add_extent_hole_real()
2663 rval = XFS_ILOG_CORE | xfs_ilog_fext(whichfork); in xfs_bmap_add_extent_hole_real()
2709 rval = xfs_ilog_fext(whichfork); in xfs_bmap_add_extent_hole_real()
2740 rval = xfs_ilog_fext(whichfork); in xfs_bmap_add_extent_hole_real()
2767 rval = XFS_ILOG_CORE | xfs_ilog_fext(whichfork); in xfs_bmap_add_extent_hole_real()
2792 xfs_rmap_map_extent(tp, ip, whichfork, new); in xfs_bmap_add_extent_hole_real()
2795 if (xfs_bmap_needs_btree(ip, whichfork)) { in xfs_bmap_add_extent_hole_real()
2800 &tmp_logflags, whichfork); in xfs_bmap_add_extent_hole_real()
2811 xfs_bmap_check_leaf_extents(cur, ip, whichfork); in xfs_bmap_add_extent_hole_real()
3832 int whichfork = xfs_bmapi_whichfork(flags); in xfs_bmapi_read() local
3833 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmapi_read()
3847 xfs_bmap_mark_sick(ip, whichfork); in xfs_bmapi_read()
3853 xfs_bmap_mark_sick(ip, whichfork); in xfs_bmapi_read()
3862 error = xfs_iread_extents(NULL, ip, whichfork); in xfs_bmapi_read()
3910 int whichfork = xfs_bmapi_whichfork(bma->flags); in xfs_bmapi_allocate() local
3911 struct xfs_ifork *ifp = xfs_ifork_ptr(bma->ip, whichfork); in xfs_bmapi_allocate()
3930 if (whichfork == XFS_DATA_FORK || whichfork == XFS_COW_FORK) { in xfs_bmapi_allocate()
3936 error = xfs_bmap_isaeof(bma, whichfork); in xfs_bmapi_allocate()
3954 xfs_bmap_mark_sick(bma->ip, whichfork); in xfs_bmapi_allocate()
3965 bma->cur = xfs_bmbt_init_cursor(mp, bma->tp, bma->ip, whichfork); in xfs_bmapi_allocate()
3984 error = xfs_bmap_add_extent_delay_real(bma, whichfork); in xfs_bmapi_allocate()
3987 whichfork, &bma->icur, &bma->cur, &bma->got, in xfs_bmapi_allocate()
4014 int whichfork = xfs_bmapi_whichfork(flags); in xfs_bmapi_convert_unwritten() local
4015 struct xfs_ifork *ifp = xfs_ifork_ptr(bma->ip, whichfork); in xfs_bmapi_convert_unwritten()
4036 bma->ip, whichfork); in xfs_bmapi_convert_unwritten()
4052 error = xfs_bmap_add_extent_unwritten_real(bma->tp, bma->ip, whichfork, in xfs_bmapi_convert_unwritten()
4065 if (whichfork != XFS_COW_FORK) in xfs_bmapi_convert_unwritten()
4110 int whichfork, in xfs_bmapi_finish() argument
4113 struct xfs_ifork *ifp = xfs_ifork_ptr(bma->ip, whichfork); in xfs_bmapi_finish()
4115 if ((bma->logflags & xfs_ilog_fext(whichfork)) && in xfs_bmapi_finish()
4117 bma->logflags &= ~xfs_ilog_fext(whichfork); in xfs_bmapi_finish()
4118 else if ((bma->logflags & xfs_ilog_fbroot(whichfork)) && in xfs_bmapi_finish()
4120 bma->logflags &= ~xfs_ilog_fbroot(whichfork); in xfs_bmapi_finish()
4160 int whichfork = xfs_bmapi_whichfork(flags); in xfs_bmapi_write() local
4161 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmapi_write()
4204 xfs_bmap_mark_sick(ip, whichfork); in xfs_bmapi_write()
4213 error = xfs_iread_extents(tp, ip, whichfork); in xfs_bmapi_write()
4221 bma.minleft = xfs_bmapi_minleft(tp, ip, whichfork); in xfs_bmapi_write()
4292 if (whichfork == XFS_COW_FORK) in xfs_bmapi_write()
4327 whichfork); in xfs_bmapi_write()
4332 ifp->if_nextents > XFS_IFORK_MAXEXT(ip, whichfork)); in xfs_bmapi_write()
4333 xfs_bmapi_finish(&bma, whichfork, 0); in xfs_bmapi_write()
4353 xfs_bmapi_finish(&bma, whichfork, error); in xfs_bmapi_write()
4366 int whichfork, in xfs_bmapi_convert_one_delalloc() argument
4371 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmapi_convert_one_delalloc()
4379 if (whichfork == XFS_COW_FORK) in xfs_bmapi_convert_one_delalloc()
4394 error = xfs_iext_count_extend(tp, ip, whichfork, in xfs_bmapi_convert_one_delalloc()
4406 WARN_ON_ONCE(whichfork != XFS_COW_FORK); in xfs_bmapi_convert_one_delalloc()
4426 bma.minleft = xfs_bmapi_minleft(tp, ip, whichfork); in xfs_bmapi_convert_one_delalloc()
4450 if (whichfork == XFS_COW_FORK) in xfs_bmapi_convert_one_delalloc()
4469 if (whichfork == XFS_COW_FORK) in xfs_bmapi_convert_one_delalloc()
4474 whichfork); in xfs_bmapi_convert_one_delalloc()
4478 xfs_bmapi_finish(&bma, whichfork, 0); in xfs_bmapi_convert_one_delalloc()
4484 xfs_bmapi_finish(&bma, whichfork, error); in xfs_bmapi_convert_one_delalloc()
4498 int whichfork, in xfs_bmapi_convert_delalloc() argument
4512 error = xfs_bmapi_convert_one_delalloc(ip, whichfork, offset, in xfs_bmapi_convert_delalloc()
4535 int whichfork = xfs_bmapi_whichfork(flags); in xfs_bmapi_remap() local
4538 ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmapi_remap()
4549 xfs_bmap_mark_sick(ip, whichfork); in xfs_bmapi_remap()
4556 error = xfs_iread_extents(tp, ip, whichfork); in xfs_bmapi_remap()
4571 cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork); in xfs_bmapi_remap()
4581 error = xfs_bmap_add_extent_hole_real(tp, ip, whichfork, &icur, in xfs_bmapi_remap()
4586 error = xfs_bmap_btree_to_extents(tp, ip, cur, &logflags, whichfork); in xfs_bmapi_remap()
4673 int whichfork, in xfs_bmap_del_extent_delay() argument
4680 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_del_extent_delay()
4685 uint32_t state = xfs_bmap_fork_to_state(whichfork); in xfs_bmap_del_extent_delay()
4691 isrt = xfs_ifork_is_realtime(ip, whichfork); in xfs_bmap_del_extent_delay()
4925 int whichfork, /* data or attr fork */ in xfs_bmap_del_extent_real() argument
4940 uint32_t state = xfs_bmap_fork_to_state(whichfork); in xfs_bmap_del_extent_real()
4948 ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_del_extent_real()
4968 ifp->if_nextents >= XFS_IFORK_MAXEXT(ip, whichfork) && in xfs_bmap_del_extent_real()
4973 if (xfs_ifork_is_realtime(ip, whichfork)) in xfs_bmap_del_extent_real()
5006 *logflagsp |= xfs_ilog_fext(whichfork); in xfs_bmap_del_extent_real()
5025 *logflagsp |= xfs_ilog_fext(whichfork); in xfs_bmap_del_extent_real()
5039 *logflagsp |= xfs_ilog_fext(whichfork); in xfs_bmap_del_extent_real()
5110 *logflagsp |= xfs_ilog_fext(whichfork); in xfs_bmap_del_extent_real()
5119 xfs_rmap_unmap_extent(tp, ip, whichfork, del); in xfs_bmap_del_extent_real()
5125 bool isrt = xfs_ifork_is_realtime(ip, whichfork); in xfs_bmap_del_extent_real()
5127 if (xfs_is_reflink_inode(ip) && whichfork == XFS_DATA_FORK) { in xfs_bmap_del_extent_real()
5200 int whichfork; /* data or attribute fork */ in __xfs_bunmapi() local
5208 whichfork = xfs_bmapi_whichfork(flags); in __xfs_bunmapi()
5209 ASSERT(whichfork != XFS_COW_FORK); in __xfs_bunmapi()
5210 ifp = xfs_ifork_ptr(ip, whichfork); in __xfs_bunmapi()
5212 xfs_bmap_mark_sick(ip, whichfork); in __xfs_bunmapi()
5222 error = xfs_iread_extents(tp, ip, whichfork); in __xfs_bunmapi()
5231 isrt = xfs_ifork_is_realtime(ip, whichfork); in __xfs_bunmapi()
5243 cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork); in __xfs_bunmapi()
5328 whichfork, &icur, &cur, &del, in __xfs_bunmapi()
5388 ip, whichfork, &icur, &cur, in __xfs_bunmapi()
5397 ip, whichfork, &icur, &cur, in __xfs_bunmapi()
5407 xfs_bmap_del_extent_delay(ip, whichfork, &icur, &got, in __xfs_bunmapi()
5411 &del, &tmp_logflags, whichfork, in __xfs_bunmapi()
5441 if (xfs_bmap_needs_btree(ip, whichfork)) { in __xfs_bunmapi()
5444 &tmp_logflags, whichfork); in __xfs_bunmapi()
5448 whichfork); in __xfs_bunmapi()
5456 if ((logflags & xfs_ilog_fext(whichfork)) && in __xfs_bunmapi()
5458 logflags &= ~xfs_ilog_fext(whichfork); in __xfs_bunmapi()
5459 else if ((logflags & xfs_ilog_fbroot(whichfork)) && in __xfs_bunmapi()
5461 logflags &= ~xfs_ilog_fbroot(whichfork); in __xfs_bunmapi()
5501 int whichfork, in xfs_bmse_can_merge() argument
5518 !xfs_bmap_same_rtgroup(ip, whichfork, left, got)) in xfs_bmse_can_merge()
5537 int whichfork, in xfs_bmse_merge() argument
5545 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmse_merge()
5554 ASSERT(xfs_bmse_can_merge(ip, whichfork, left, got, shift)); in xfs_bmse_merge()
5601 error = xfs_bmap_btree_to_extents(tp, ip, cur, logflags, whichfork); in xfs_bmse_merge()
5608 xfs_iext_update_extent(ip, xfs_bmap_fork_to_state(whichfork), icur, in xfs_bmse_merge()
5612 xfs_rmap_unmap_extent(tp, ip, whichfork, got); in xfs_bmse_merge()
5615 xfs_rmap_map_extent(tp, ip, whichfork, &new); in xfs_bmse_merge()
5623 int whichfork, in xfs_bmap_shift_update_extent() argument
5654 xfs_iext_update_extent(ip, xfs_bmap_fork_to_state(whichfork), icur, in xfs_bmap_shift_update_extent()
5658 xfs_rmap_unmap_extent(tp, ip, whichfork, &prev); in xfs_bmap_shift_update_extent()
5659 xfs_rmap_map_extent(tp, ip, whichfork, got); in xfs_bmap_shift_update_extent()
5671 int whichfork = XFS_DATA_FORK; in xfs_bmap_collapse_extents() local
5673 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_collapse_extents()
5683 xfs_bmap_mark_sick(ip, whichfork); in xfs_bmap_collapse_extents()
5692 error = xfs_iread_extents(tp, ip, whichfork); in xfs_bmap_collapse_extents()
5697 cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork); in xfs_bmap_collapse_extents()
5704 xfs_bmap_mark_sick(ip, whichfork); in xfs_bmap_collapse_extents()
5716 if (xfs_bmse_can_merge(ip, whichfork, &prev, &got, in xfs_bmap_collapse_extents()
5718 error = xfs_bmse_merge(tp, ip, whichfork, in xfs_bmap_collapse_extents()
5732 error = xfs_bmap_shift_update_extent(tp, ip, whichfork, &icur, &got, in xfs_bmap_collapse_extents()
5787 int whichfork = XFS_DATA_FORK; in xfs_bmap_insert_extents() local
5789 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_insert_extents()
5799 xfs_bmap_mark_sick(ip, whichfork); in xfs_bmap_insert_extents()
5808 error = xfs_iread_extents(tp, ip, whichfork); in xfs_bmap_insert_extents()
5813 cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork); in xfs_bmap_insert_extents()
5829 xfs_bmap_mark_sick(ip, whichfork); in xfs_bmap_insert_extents()
5835 xfs_bmap_mark_sick(ip, whichfork); in xfs_bmap_insert_extents()
5853 if (xfs_bmse_can_merge(ip, whichfork, &got, &next, in xfs_bmap_insert_extents()
5858 error = xfs_bmap_shift_update_extent(tp, ip, whichfork, &icur, &got, in xfs_bmap_insert_extents()
5890 int whichfork = XFS_DATA_FORK; in xfs_bmap_split_extent() local
5891 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_split_extent()
5904 xfs_bmap_mark_sick(ip, whichfork); in xfs_bmap_split_extent()
5912 error = xfs_iread_extents(tp, ip, whichfork); in xfs_bmap_split_extent()
5930 cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork); in xfs_bmap_split_extent()
5942 xfs_iext_update_extent(ip, xfs_bmap_fork_to_state(whichfork), &icur, in xfs_bmap_split_extent()
5980 if (xfs_bmap_needs_btree(ip, whichfork)) { in xfs_bmap_split_extent()
5985 &tmp_logflags, whichfork); in xfs_bmap_split_extent()
6006 int whichfork, in __xfs_bmap_add() argument
6011 if ((whichfork != XFS_DATA_FORK && whichfork != XFS_ATTR_FORK) || in __xfs_bmap_add()
6020 bi->bi_whichfork = whichfork; in __xfs_bmap_add()
6031 int whichfork, in xfs_bmap_map_extent() argument
6034 __xfs_bmap_add(tp, XFS_BMAP_MAP, ip, whichfork, PREV); in xfs_bmap_map_extent()
6042 int whichfork, in xfs_bmap_unmap_extent() argument
6045 __xfs_bmap_add(tp, XFS_BMAP_UNMAP, ip, whichfork, PREV); in xfs_bmap_unmap_extent()
6099 int whichfork, in xfs_bmap_validate_extent_raw() argument
6105 if (rtfile && whichfork == XFS_DATA_FORK) { in xfs_bmap_validate_extent_raw()
6114 if (irec->br_state != XFS_EXT_NORM && whichfork != XFS_DATA_FORK) in xfs_bmap_validate_extent_raw()
6140 int whichfork, in xfs_bmap_validate_extent() argument
6144 XFS_IS_REALTIME_INODE(ip), whichfork, irec); in xfs_bmap_validate_extent()
6204 fa = xfs_bmap_validate_extent(cur->bc_ino.ip, cur->bc_ino.whichfork, in xfs_bmap_query_range_helper()
6209 cur->bc_ino.whichfork, fa, &irec); in xfs_bmap_query_range_helper()