Lines Matching full:ifp
135 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_needs_btree() local
138 ifp->if_format == XFS_DINODE_FMT_EXTENTS && in xfs_bmap_needs_btree()
139 ifp->if_nextents > XFS_IFORK_MAXEXT(ip, whichfork); in xfs_bmap_needs_btree()
147 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_wants_extents() local
150 ifp->if_format == XFS_DINODE_FMT_BTREE && in xfs_bmap_wants_extents()
151 ifp->if_nextents <= XFS_IFORK_MAXEXT(ip, whichfork); in xfs_bmap_wants_extents()
348 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_check_leaf_extents() local
361 if (ifp->if_format != XFS_DINODE_FMT_BTREE) in xfs_bmap_check_leaf_extents()
369 block = ifp->if_broot; in xfs_bmap_check_leaf_extents()
375 xfs_check_block(block, mp, 1, ifp->if_broot_bytes); in xfs_bmap_check_leaf_extents()
376 pp = xfs_bmap_broot_ptr_addr(mp, block, 1, ifp->if_broot_bytes); in xfs_bmap_check_leaf_extents()
568 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_btree_to_extents() local
570 struct xfs_btree_block *rblock = ifp->if_broot; in xfs_bmap_btree_to_extents()
584 ASSERT(ifp->if_format == XFS_DINODE_FMT_BTREE); in xfs_bmap_btree_to_extents()
587 ASSERT(xfs_bmbt_maxrecs(mp, ifp->if_broot_bytes, false) == 1); in xfs_bmap_btree_to_extents()
589 pp = xfs_bmap_broot_ptr_addr(mp, rblock, 1, ifp->if_broot_bytes); in xfs_bmap_btree_to_extents()
618 ASSERT(ifp->if_broot == NULL); in xfs_bmap_btree_to_extents()
619 ifp->if_format = XFS_DINODE_FMT_EXTENTS; in xfs_bmap_btree_to_extents()
644 struct xfs_ifork *ifp; /* inode fork pointer */ in xfs_bmap_extents_to_btree() local
654 ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_extents_to_btree()
655 ASSERT(ifp->if_format == XFS_DINODE_FMT_EXTENTS); in xfs_bmap_extents_to_btree()
666 block = ifp->if_broot; in xfs_bmap_extents_to_btree()
677 ifp->if_format = XFS_DINODE_FMT_BTREE; in xfs_bmap_extents_to_btree()
714 for_each_xfs_iext(ifp, &icur, &rec) { in xfs_bmap_extents_to_btree()
721 ASSERT(cnt == ifp->if_nextents); in xfs_bmap_extents_to_btree()
749 ifp->if_format = XFS_DINODE_FMT_EXTENTS; in xfs_bmap_extents_to_btree()
750 ASSERT(ifp->if_broot == NULL); in xfs_bmap_extents_to_btree()
768 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_local_to_extents_empty() local
771 ASSERT(ifp->if_format == XFS_DINODE_FMT_LOCAL); in xfs_bmap_local_to_extents_empty()
772 ASSERT(ifp->if_bytes == 0); in xfs_bmap_local_to_extents_empty()
773 ASSERT(ifp->if_nextents == 0); in xfs_bmap_local_to_extents_empty()
776 ifp->if_data = NULL; in xfs_bmap_local_to_extents_empty()
777 ifp->if_height = 0; in xfs_bmap_local_to_extents_empty()
778 ifp->if_format = XFS_DINODE_FMT_EXTENTS; in xfs_bmap_local_to_extents_empty()
793 struct xfs_ifork *ifp, void *priv), in xfs_bmap_local_to_extents() argument
798 struct xfs_ifork *ifp; /* inode fork pointer */ in xfs_bmap_local_to_extents() local
809 ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_local_to_extents()
810 ASSERT(ifp->if_format == XFS_DINODE_FMT_LOCAL); in xfs_bmap_local_to_extents()
812 if (!ifp->if_bytes) { in xfs_bmap_local_to_extents()
855 init_fn(tp, bp, ip, ifp, priv); in xfs_bmap_local_to_extents()
858 xfs_idata_realloc(ip, -ifp->if_bytes, whichfork); in xfs_bmap_local_to_extents()
862 ifp->if_data = NULL; in xfs_bmap_local_to_extents()
863 ifp->if_height = 0; in xfs_bmap_local_to_extents()
869 xfs_iext_first(ifp, &icur); in xfs_bmap_local_to_extents()
872 ifp->if_nextents = 1; in xfs_bmap_local_to_extents()
1147 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_iread_bmbt_block() local
1153 if (unlikely(ir->loaded + num_recs > ifp->if_nextents)) { in xfs_iread_bmbt_block()
1182 xfs_iext_next(ifp, &ir->icur); in xfs_iread_bmbt_block()
1198 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_iread_extents() local
1203 if (!xfs_need_iread_extents(ifp)) in xfs_iread_extents()
1209 xfs_iext_first(ifp, &ir.icur); in xfs_iread_extents()
1217 if (XFS_IS_CORRUPT(mp, ir.loaded != ifp->if_nextents)) { in xfs_iread_extents()
1222 ASSERT(ir.loaded == xfs_iext_count(ifp)); in xfs_iread_extents()
1228 smp_store_release(&ifp->if_needextents, 0); in xfs_iread_extents()
1233 xfs_iext_destroy(ifp); in xfs_iread_extents()
1251 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_first_unused() local
1258 if (ifp->if_format == XFS_DINODE_FMT_LOCAL) { in xfs_bmap_first_unused()
1263 ASSERT(xfs_ifork_has_extents(ifp)); in xfs_bmap_first_unused()
1270 for_each_xfs_iext(ifp, &icur, &got) { in xfs_bmap_first_unused()
1298 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_last_before() local
1303 switch (ifp->if_format) { in xfs_bmap_last_before()
1320 if (!xfs_iext_lookup_extent_before(ip, ifp, last_block, &icur, &got)) in xfs_bmap_last_before()
1333 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_last_extent() local
1341 xfs_iext_last(ifp, &icur); in xfs_bmap_last_extent()
1342 if (!xfs_iext_get_extent(ifp, &icur, rec)) in xfs_bmap_last_extent()
1399 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_last_offset() local
1406 if (ifp->if_format == XFS_DINODE_FMT_LOCAL) in xfs_bmap_last_offset()
1409 if (XFS_IS_CORRUPT(ip->i_mount, !xfs_ifork_has_extents(ifp))) { in xfs_bmap_last_offset()
1435 struct xfs_ifork *ifp = xfs_ifork_ptr(bma->ip, whichfork); in xfs_bmap_add_extent_delay_real() local
1463 xfs_iext_get_extent(ifp, &bma->icur, &PREV); in xfs_bmap_add_extent_delay_real()
1485 if (xfs_iext_peek_prev_extent(ifp, &bma->icur, &LEFT)) { in xfs_bmap_add_extent_delay_real()
1503 if (xfs_iext_peek_next_extent(ifp, &bma->icur, &RIGHT)) { in xfs_bmap_add_extent_delay_real()
1538 xfs_iext_prev(ifp, &bma->icur); in xfs_bmap_add_extent_delay_real()
1540 ifp->if_nextents--; in xfs_bmap_add_extent_delay_real()
1586 xfs_iext_prev(ifp, &bma->icur); in xfs_bmap_add_extent_delay_real()
1619 xfs_iext_next(ifp, &bma->icur); in xfs_bmap_add_extent_delay_real()
1621 xfs_iext_prev(ifp, &bma->icur); in xfs_bmap_add_extent_delay_real()
1652 ifp->if_nextents++; in xfs_bmap_add_extent_delay_real()
1695 xfs_iext_prev(ifp, &bma->icur); in xfs_bmap_add_extent_delay_real()
1723 ifp->if_nextents++; in xfs_bmap_add_extent_delay_real()
1763 xfs_iext_next(ifp, &bma->icur); in xfs_bmap_add_extent_delay_real()
1765 xfs_iext_prev(ifp, &bma->icur); in xfs_bmap_add_extent_delay_real()
1803 xfs_iext_next(ifp, &bma->icur); in xfs_bmap_add_extent_delay_real()
1814 ifp->if_nextents++; in xfs_bmap_add_extent_delay_real()
1854 xfs_iext_next(ifp, &bma->icur); in xfs_bmap_add_extent_delay_real()
1900 xfs_iext_next(ifp, &bma->icur); in xfs_bmap_add_extent_delay_real()
1903 ifp->if_nextents++; in xfs_bmap_add_extent_delay_real()
2009 struct xfs_ifork *ifp; /* inode fork pointer */ in xfs_bmap_add_extent_unwritten_real() local
2021 ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_add_extent_unwritten_real()
2035 xfs_iext_get_extent(ifp, icur, &PREV); in xfs_bmap_add_extent_unwritten_real()
2054 if (xfs_iext_peek_prev_extent(ifp, icur, &LEFT)) { in xfs_bmap_add_extent_unwritten_real()
2072 if (xfs_iext_peek_next_extent(ifp, icur, &RIGHT)) { in xfs_bmap_add_extent_unwritten_real()
2106 xfs_iext_prev(ifp, icur); in xfs_bmap_add_extent_unwritten_real()
2108 ifp->if_nextents -= 2; in xfs_bmap_add_extent_unwritten_real()
2163 xfs_iext_prev(ifp, icur); in xfs_bmap_add_extent_unwritten_real()
2165 ifp->if_nextents--; in xfs_bmap_add_extent_unwritten_real()
2206 xfs_iext_next(ifp, icur); in xfs_bmap_add_extent_unwritten_real()
2208 xfs_iext_prev(ifp, icur); in xfs_bmap_add_extent_unwritten_real()
2210 ifp->if_nextents--; in xfs_bmap_add_extent_unwritten_real()
2284 xfs_iext_prev(ifp, icur); in xfs_bmap_add_extent_unwritten_real()
2323 ifp->if_nextents++; in xfs_bmap_add_extent_unwritten_real()
2364 xfs_iext_next(ifp, icur); in xfs_bmap_add_extent_unwritten_real()
2400 xfs_iext_next(ifp, icur); in xfs_bmap_add_extent_unwritten_real()
2402 ifp->if_nextents++; in xfs_bmap_add_extent_unwritten_real()
2454 xfs_iext_next(ifp, icur); in xfs_bmap_add_extent_unwritten_real()
2457 ifp->if_nextents += 2; in xfs_bmap_add_extent_unwritten_real()
2561 struct xfs_ifork *ifp; /* inode fork pointer */ in xfs_bmap_add_extent_hole_delay() local
2569 ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_add_extent_hole_delay()
2575 if (xfs_iext_peek_prev_extent(ifp, icur, &left)) { in xfs_bmap_add_extent_hole_delay()
2585 if (xfs_iext_get_extent(ifp, icur, &right)) { in xfs_bmap_add_extent_hole_delay()
2630 xfs_iext_prev(ifp, icur); in xfs_bmap_add_extent_hole_delay()
2649 xfs_iext_prev(ifp, icur); in xfs_bmap_add_extent_hole_delay()
2705 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_add_extent_hole_real() local
2724 if (xfs_iext_peek_prev_extent(ifp, icur, &left)) { in xfs_bmap_add_extent_hole_real()
2734 if (xfs_iext_get_extent(ifp, icur, &right)) { in xfs_bmap_add_extent_hole_real()
2775 xfs_iext_prev(ifp, icur); in xfs_bmap_add_extent_hole_real()
2777 ifp->if_nextents--; in xfs_bmap_add_extent_hole_real()
2822 xfs_iext_prev(ifp, icur); in xfs_bmap_add_extent_hole_real()
2881 ifp->if_nextents++; in xfs_bmap_add_extent_hole_real()
3937 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmapi_read() local
3950 if (WARN_ON_ONCE(!ifp)) { in xfs_bmapi_read()
3955 if (XFS_IS_CORRUPT(mp, !xfs_ifork_has_extents(ifp)) || in xfs_bmapi_read()
3970 if (!xfs_iext_lookup_extent(ip, ifp, bno, &icur, &got)) in xfs_bmapi_read()
4002 if (!xfs_iext_next_extent(ifp, &icur, &got)) in xfs_bmapi_read()
4034 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmapi_reserve_delalloc() local
4068 if (!xfs_iext_peek_prev_extent(ifp, icur, &prev)) in xfs_bmapi_reserve_delalloc()
4153 struct xfs_ifork *ifp = xfs_ifork_ptr(bma->ip, whichfork); in xfs_bmapi_allocate() local
4206 if (ifp->if_format == XFS_DINODE_FMT_BTREE && !bma->cur) in xfs_bmapi_allocate()
4239 xfs_iext_get_extent(ifp, &bma->icur, &bma->got); in xfs_bmapi_allocate()
4257 struct xfs_ifork *ifp = xfs_ifork_ptr(bma->ip, whichfork); in xfs_bmapi_convert_unwritten() local
4276 if (ifp->if_format == XFS_DINODE_FMT_BTREE && !bma->cur) { in xfs_bmapi_convert_unwritten()
4317 xfs_iext_get_extent(ifp, &bma->icur, &bma->got); in xfs_bmapi_convert_unwritten()
4334 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, fork); in xfs_bmapi_minleft() local
4338 if (ifp->if_format != XFS_DINODE_FMT_BTREE) in xfs_bmapi_minleft()
4340 return be16_to_cpu(ifp->if_broot->bb_level) + 1; in xfs_bmapi_minleft()
4355 struct xfs_ifork *ifp = xfs_ifork_ptr(bma->ip, whichfork); in xfs_bmapi_finish() local
4358 ifp->if_format != XFS_DINODE_FMT_EXTENTS) in xfs_bmapi_finish()
4361 ifp->if_format != XFS_DINODE_FMT_BTREE) in xfs_bmapi_finish()
4403 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmapi_write() local
4428 ASSERT(ifp->if_format != XFS_DINODE_FMT_LOCAL); in xfs_bmapi_write()
4444 if (XFS_IS_CORRUPT(mp, !xfs_ifork_has_extents(ifp)) || in xfs_bmapi_write()
4459 if (!xfs_iext_lookup_extent(ip, ifp, bno, &bma.icur, &bma.got)) in xfs_bmapi_write()
4461 if (!xfs_iext_peek_prev_extent(ifp, &bma.icur, &bma.prev)) in xfs_bmapi_write()
4563 if (!xfs_iext_next_extent(ifp, &bma.icur, &bma.got)) in xfs_bmapi_write()
4572 ASSERT(ifp->if_format != XFS_DINODE_FMT_BTREE || in xfs_bmapi_write()
4573 ifp->if_nextents > XFS_IFORK_MAXEXT(ip, whichfork)); in xfs_bmapi_write()
4612 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmapi_convert_one_delalloc() local
4640 if (!xfs_iext_lookup_extent(ip, ifp, offset_fsb, &bma.icur, &bma.got) || in xfs_bmapi_convert_one_delalloc()
4660 *seq = READ_ONCE(ifp->if_seq); in xfs_bmapi_convert_one_delalloc()
4694 if (!xfs_iext_peek_prev_extent(ifp, &bma.icur, &bma.prev)) in xfs_bmapi_convert_one_delalloc()
4708 *seq = READ_ONCE(ifp->if_seq); in xfs_bmapi_convert_one_delalloc()
4771 struct xfs_ifork *ifp; in xfs_bmapi_remap() local
4778 ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmapi_remap()
4787 if (XFS_IS_CORRUPT(mp, !xfs_ifork_has_extents(ifp)) || in xfs_bmapi_remap()
4800 if (xfs_iext_lookup_extent(ip, ifp, bno, &icur, &got)) { in xfs_bmapi_remap()
4810 if (ifp->if_format == XFS_DINODE_FMT_BTREE) in xfs_bmapi_remap()
4919 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_del_extent_delay() local
4959 xfs_iext_prev(ifp, icur); in xfs_bmap_del_extent_delay()
5025 xfs_iext_next(ifp, icur); in xfs_bmap_del_extent_delay()
5053 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, XFS_COW_FORK); in xfs_bmap_del_extent_cow() local
5079 xfs_iext_prev(ifp, icur); in xfs_bmap_del_extent_cow()
5109 xfs_iext_next(ifp, icur); in xfs_bmap_del_extent_cow()
5137 struct xfs_ifork *ifp; /* inode fork pointer */ in xfs_bmap_del_extent_real() local
5151 ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_del_extent_real()
5153 xfs_iext_get_extent(ifp, icur, &got); in xfs_bmap_del_extent_real()
5170 ifp->if_format == XFS_DINODE_FMT_EXTENTS && in xfs_bmap_del_extent_real()
5171 ifp->if_nextents >= XFS_IFORK_MAXEXT(ip, whichfork) && in xfs_bmap_del_extent_real()
5204 xfs_iext_prev(ifp, icur); in xfs_bmap_del_extent_real()
5205 ifp->if_nextents--; in xfs_bmap_del_extent_real()
5315 ifp->if_nextents++; in xfs_bmap_del_extent_real()
5316 xfs_iext_next(ifp, icur); in xfs_bmap_del_extent_real()
5391 struct xfs_ifork *ifp; /* inode fork pointer */ in __xfs_bunmapi() local
5408 ifp = xfs_ifork_ptr(ip, whichfork); in __xfs_bunmapi()
5409 if (XFS_IS_CORRUPT(mp, !xfs_ifork_has_extents(ifp))) { in __xfs_bunmapi()
5424 if (xfs_iext_count(ifp) == 0) { in __xfs_bunmapi()
5432 if (!xfs_iext_lookup_extent_before(ip, ifp, &end, &icur, &got)) { in __xfs_bunmapi()
5439 if (ifp->if_format == XFS_DINODE_FMT_BTREE) { in __xfs_bunmapi()
5440 ASSERT(ifp->if_format == XFS_DINODE_FMT_BTREE); in __xfs_bunmapi()
5453 !xfs_iext_prev_extent(ifp, &icur, &got)) { in __xfs_bunmapi()
5503 !xfs_iext_prev_extent(ifp, &icur, &got)) { in __xfs_bunmapi()
5556 !xfs_iext_prev_extent(ifp, &icur, &got)) { in __xfs_bunmapi()
5571 if (!xfs_iext_prev_extent(ifp, &icur, &prev)) in __xfs_bunmapi()
5621 if (!xfs_iext_get_extent(ifp, &icur, &got) || in __xfs_bunmapi()
5623 !xfs_iext_prev_extent(ifp, &icur, &got))) { in __xfs_bunmapi()
5654 ifp->if_format != XFS_DINODE_FMT_EXTENTS) in __xfs_bunmapi()
5657 ifp->if_format != XFS_DINODE_FMT_BTREE) in __xfs_bunmapi()
5739 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmse_merge() local
5757 ifp->if_nextents--; in xfs_bmse_merge()
5801 xfs_iext_prev(ifp, icur); in xfs_bmse_merge()
5867 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_collapse_extents() local
5875 if (XFS_IS_CORRUPT(mp, !xfs_ifork_has_extents(ifp)) || in xfs_bmap_collapse_extents()
5890 if (ifp->if_format == XFS_DINODE_FMT_BTREE) in xfs_bmap_collapse_extents()
5893 if (!xfs_iext_lookup_extent(ip, ifp, *next_fsb, &icur, &got)) { in xfs_bmap_collapse_extents()
5904 if (xfs_iext_peek_prev_extent(ifp, &icur, &prev)) { in xfs_bmap_collapse_extents()
5931 if (!xfs_iext_next_extent(ifp, &icur, &got)) { in xfs_bmap_collapse_extents()
5982 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_insert_extents() local
5990 if (XFS_IS_CORRUPT(mp, !xfs_ifork_has_extents(ifp)) || in xfs_bmap_insert_extents()
6005 if (ifp->if_format == XFS_DINODE_FMT_BTREE) in xfs_bmap_insert_extents()
6009 xfs_iext_last(ifp, &icur); in xfs_bmap_insert_extents()
6010 if (!xfs_iext_get_extent(ifp, &icur, &got) || in xfs_bmap_insert_extents()
6016 if (!xfs_iext_lookup_extent(ip, ifp, *next_fsb, &icur, &got)) { in xfs_bmap_insert_extents()
6034 if (xfs_iext_peek_next_extent(ifp, &icur, &next)) { in xfs_bmap_insert_extents()
6055 if (!xfs_iext_prev_extent(ifp, &icur, &got) || in xfs_bmap_insert_extents()
6083 struct xfs_ifork *ifp = xfs_ifork_ptr(ip, whichfork); in xfs_bmap_split_extent() local
6094 if (XFS_IS_CORRUPT(mp, !xfs_ifork_has_extents(ifp)) || in xfs_bmap_split_extent()
6111 if (!xfs_iext_lookup_extent(ip, ifp, split_fsb, &icur, &got) || in xfs_bmap_split_extent()
6121 if (ifp->if_format == XFS_DINODE_FMT_BTREE) { in xfs_bmap_split_extent()
6146 xfs_iext_next(ifp, &icur); in xfs_bmap_split_extent()
6148 ifp->if_nextents++; in xfs_bmap_split_extent()