Lines Matching refs:tp
531 struct xfs_trans *tp, in __xfs_bmap_add_free() argument
539 struct xfs_mount *mp = tp->t_mountp; in __xfs_bmap_add_free()
565 trace_xfs_bmap_free_defer(tp->t_mountp, in __xfs_bmap_add_free()
566 XFS_FSB_TO_AGNO(tp->t_mountp, bno), 0, in __xfs_bmap_add_free()
567 XFS_FSB_TO_AGBNO(tp->t_mountp, bno), len); in __xfs_bmap_add_free()
568 xfs_defer_add(tp, XFS_DEFER_OPS_TYPE_FREE, &new->xefi_list); in __xfs_bmap_add_free()
584 struct xfs_trans *tp, /* transaction pointer */ in xfs_bmap_btree_to_extents() argument
618 error = xfs_btree_read_bufl(mp, tp, cbno, &cbp, XFS_BMAP_BTREE_REF, in xfs_bmap_btree_to_extents()
628 xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT, -1L); in xfs_bmap_btree_to_extents()
629 xfs_trans_binval(tp, cbp); in xfs_bmap_btree_to_extents()
646 struct xfs_trans *tp, /* transaction pointer */ in xfs_bmap_extents_to_btree() argument
690 cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork); in xfs_bmap_extents_to_btree()
697 args.tp = tp; in xfs_bmap_extents_to_btree()
700 if (tp->t_firstblock == NULLFSBLOCK) { in xfs_bmap_extents_to_btree()
703 } else if (tp->t_flags & XFS_TRANS_LOWMODE) { in xfs_bmap_extents_to_btree()
705 args.fsbno = tp->t_firstblock; in xfs_bmap_extents_to_btree()
708 args.fsbno = tp->t_firstblock; in xfs_bmap_extents_to_btree()
725 ASSERT(tp->t_firstblock == NULLFSBLOCK || in xfs_bmap_extents_to_btree()
726 args.agno >= XFS_FSB_TO_AGNO(mp, tp->t_firstblock)); in xfs_bmap_extents_to_btree()
727 tp->t_firstblock = args.fsbno; in xfs_bmap_extents_to_btree()
730 xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT, 1L); in xfs_bmap_extents_to_btree()
731 error = xfs_trans_get_buf(tp, mp->m_ddev_targp, in xfs_bmap_extents_to_btree()
778 xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT, -1L); in xfs_bmap_extents_to_btree()
796 struct xfs_trans *tp, in xfs_bmap_local_to_extents_empty() argument
813 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); in xfs_bmap_local_to_extents_empty()
819 xfs_trans_t *tp, /* transaction pointer */ in xfs_bmap_local_to_extents() argument
824 void (*init_fn)(struct xfs_trans *tp, in xfs_bmap_local_to_extents() argument
846 xfs_bmap_local_to_extents_empty(tp, ip, whichfork); in xfs_bmap_local_to_extents()
855 args.tp = tp; in xfs_bmap_local_to_extents()
862 if (tp->t_firstblock == NULLFSBLOCK) { in xfs_bmap_local_to_extents()
866 args.fsbno = tp->t_firstblock; in xfs_bmap_local_to_extents()
878 tp->t_firstblock = args.fsbno; in xfs_bmap_local_to_extents()
879 error = xfs_trans_get_buf(tp, args.mp->m_ddev_targp, in xfs_bmap_local_to_extents()
893 init_fn(tp, bp, ip, ifp); in xfs_bmap_local_to_extents()
897 xfs_bmap_local_to_extents_empty(tp, ip, whichfork); in xfs_bmap_local_to_extents()
912 xfs_trans_mod_dquot_byino(tp, ip, in xfs_bmap_local_to_extents()
926 xfs_trans_t *tp, /* transaction pointer */ in xfs_bmap_add_attrfork_btree() argument
939 cur = xfs_bmbt_init_cursor(mp, tp, ip, XFS_DATA_FORK); in xfs_bmap_add_attrfork_btree()
968 struct xfs_trans *tp, /* transaction pointer */ in xfs_bmap_add_attrfork_extents() argument
979 error = xfs_bmap_extents_to_btree(tp, ip, &cur, 0, flags, in xfs_bmap_add_attrfork_extents()
1001 struct xfs_trans *tp, /* transaction pointer */ in xfs_bmap_add_attrfork_local() argument
1016 dargs.trans = tp; in xfs_bmap_add_attrfork_local()
1021 return xfs_bmap_local_to_extents(tp, ip, 1, flags, in xfs_bmap_add_attrfork_local()
1069 xfs_trans_t *tp; /* transaction pointer */ in xfs_bmap_add_attrfork() local
1083 rsvd ? XFS_TRANS_RESERVE : 0, &tp); in xfs_bmap_add_attrfork()
1088 error = xfs_trans_reserve_quota_nblks(tp, ip, blks, 0, rsvd ? in xfs_bmap_add_attrfork()
1096 xfs_trans_ijoin(tp, ip, 0); in xfs_bmap_add_attrfork()
1097 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); in xfs_bmap_add_attrfork()
1111 error = xfs_bmap_add_attrfork_local(tp, ip, &logflags); in xfs_bmap_add_attrfork()
1114 error = xfs_bmap_add_attrfork_extents(tp, ip, &logflags); in xfs_bmap_add_attrfork()
1117 error = xfs_bmap_add_attrfork_btree(tp, ip, &logflags); in xfs_bmap_add_attrfork()
1124 xfs_trans_log_inode(tp, ip, logflags); in xfs_bmap_add_attrfork()
1142 xfs_log_sb(tp); in xfs_bmap_add_attrfork()
1145 error = xfs_trans_commit(tp); in xfs_bmap_add_attrfork()
1150 xfs_trans_cancel(tp); in xfs_bmap_add_attrfork()
1223 struct xfs_trans *tp, in xfs_iread_extents() argument
1242 cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork); in xfs_iread_extents()
1270 struct xfs_trans *tp, /* transaction pointer */ in xfs_bmap_first_unused() argument
1291 error = xfs_iread_extents(tp, ip, whichfork); in xfs_bmap_first_unused()
1320 struct xfs_trans *tp, /* transaction pointer */ in xfs_bmap_last_before() argument
1343 error = xfs_iread_extents(tp, ip, whichfork); in xfs_bmap_last_before()
1355 struct xfs_trans *tp, in xfs_bmap_last_extent() argument
1366 error = xfs_iread_extents(tp, ip, whichfork); in xfs_bmap_last_extent()
1794 error = xfs_bmap_extents_to_btree(bma->tp, bma->ip, in xfs_bmap_add_extent_delay_real()
1881 error = xfs_bmap_extents_to_btree(bma->tp, bma->ip, in xfs_bmap_add_extent_delay_real()
1967 error = xfs_bmap_extents_to_btree(bma->tp, bma->ip, in xfs_bmap_add_extent_delay_real()
1993 xfs_rmap_map_extent(bma->tp, bma->ip, whichfork, new); in xfs_bmap_add_extent_delay_real()
2000 error = xfs_bmap_extents_to_btree(bma->tp, bma->ip, in xfs_bmap_add_extent_delay_real()
2038 struct xfs_trans *tp, in xfs_bmap_add_extent_unwritten_real() argument
2539 xfs_rmap_convert_extent(mp, tp, ip, whichfork, new); in xfs_bmap_add_extent_unwritten_real()
2546 error = xfs_bmap_extents_to_btree(tp, ip, &cur, 0, in xfs_bmap_add_extent_unwritten_real()
2713 struct xfs_trans *tp, in xfs_bmap_add_extent_hole_real() argument
2919 xfs_rmap_map_extent(tp, ip, whichfork, new); in xfs_bmap_add_extent_hole_real()
2926 error = xfs_bmap_extents_to_btree(tp, ip, curp, 0, in xfs_bmap_add_extent_hole_real()
3145 nullfb = ap->tp->t_firstblock == NULLFSBLOCK; in xfs_bmap_adjacent()
3149 ap->tp->t_firstblock); in xfs_bmap_adjacent()
3279 struct xfs_trans *tp, in xfs_bmap_longest_free_extent() argument
3284 struct xfs_mount *mp = tp->t_mountp; in xfs_bmap_longest_free_extent()
3291 error = xfs_alloc_pagf_init(mp, tp, ag, XFS_ALLOC_FLAG_TRYLOCK); in xfs_bmap_longest_free_extent()
3360 error = xfs_bmap_longest_free_extent(args->tp, ag, blen, in xfs_bmap_btalloc_nullfb()
3393 error = xfs_bmap_longest_free_extent(args->tp, ag, blen, ¬init); in xfs_bmap_btalloc_filestreams()
3402 error = xfs_bmap_longest_free_extent(args->tp, ag, blen, in xfs_bmap_btalloc_filestreams()
3449 xfs_trans_mod_dquot_byino(ap->tp, ap->ip, XFS_TRANS_DQ_RES_BLKS, in xfs_bmap_btalloc_accounting()
3456 xfs_trans_log_inode(ap->tp, ap->ip, XFS_ILOG_CORE); in xfs_bmap_btalloc_accounting()
3461 xfs_trans_mod_dquot_byino(ap->tp, ap->ip, in xfs_bmap_btalloc_accounting()
3512 nullfb = ap->tp->t_firstblock == NULLFSBLOCK; in xfs_bmap_btalloc()
3514 ap->tp->t_firstblock); in xfs_bmap_btalloc()
3525 ap->blkno = ap->tp->t_firstblock; in xfs_bmap_btalloc()
3536 ap->blkno = ap->tp->t_firstblock; in xfs_bmap_btalloc()
3542 args.tp = ap->tp; in xfs_bmap_btalloc()
3563 } else if (ap->tp->t_flags & XFS_TRANS_LOWMODE) { in xfs_bmap_btalloc()
3596 if (!(ap->tp->t_flags & XFS_TRANS_LOWMODE) && ap->aeof) { in xfs_bmap_btalloc()
3688 ap->tp->t_flags |= XFS_TRANS_LOWMODE; in xfs_bmap_btalloc()
3695 ASSERT(ap->tp->t_firstblock == NULLFSBLOCK || in xfs_bmap_btalloc()
3696 XFS_FSB_TO_AGNO(mp, ap->tp->t_firstblock) <= in xfs_bmap_btalloc()
3700 if (ap->tp->t_firstblock == NULLFSBLOCK) in xfs_bmap_btalloc()
3701 ap->tp->t_firstblock = args.fsbno; in xfs_bmap_btalloc()
4136 bma->cur = xfs_bmbt_init_cursor(mp, bma->tp, bma->ip, whichfork); in xfs_bmapi_allocate()
4158 error = xfs_bmap_add_extent_hole_real(bma->tp, bma->ip, in xfs_bmapi_allocate()
4209 bma->cur = xfs_bmbt_init_cursor(bma->ip->i_mount, bma->tp, in xfs_bmapi_convert_unwritten()
4226 error = xfs_bmap_add_extent_unwritten_real(bma->tp, bma->ip, whichfork, in xfs_bmapi_convert_unwritten()
4262 struct xfs_trans *tp, in xfs_bmapi_minleft() argument
4268 if (tp && tp->t_firstblock != NULLFSBLOCK) in xfs_bmapi_minleft()
4297 xfs_trans_log_inode(bma->tp, bma->ip, bma->logflags); in xfs_bmapi_finish()
4310 struct xfs_trans *tp, /* transaction pointer */ in xfs_bmapi_write() argument
4320 .tp = tp, in xfs_bmapi_write()
4349 ASSERT(tp != NULL); in xfs_bmapi_write()
4378 error = xfs_iread_extents(tp, ip, whichfork); in xfs_bmapi_write()
4387 bma.minleft = xfs_bmapi_minleft(tp, ip, whichfork); in xfs_bmapi_write()
4446 xfs_refcount_alloc_cow_extent(tp, bma.blkno, in xfs_bmapi_write()
4479 error = xfs_bmap_btree_to_extents(tp, ip, bma.cur, &bma.logflags, in xfs_bmapi_write()
4514 struct xfs_trans *tp; in xfs_bmapi_convert_delalloc() local
4525 XFS_TRANS_RESERVE, &tp); in xfs_bmapi_convert_delalloc()
4530 xfs_trans_ijoin(tp, ip, 0); in xfs_bmapi_convert_delalloc()
4554 bma.tp = tp; in xfs_bmapi_convert_delalloc()
4559 bma.minleft = xfs_bmapi_minleft(tp, ip, whichfork); in xfs_bmapi_convert_delalloc()
4600 xfs_refcount_alloc_cow_extent(tp, bma.blkno, bma.length); in xfs_bmapi_convert_delalloc()
4602 error = xfs_bmap_btree_to_extents(tp, ip, bma.cur, &bma.logflags, in xfs_bmapi_convert_delalloc()
4608 error = xfs_trans_commit(tp); in xfs_bmapi_convert_delalloc()
4615 xfs_trans_cancel(tp); in xfs_bmapi_convert_delalloc()
4622 struct xfs_trans *tp, in xfs_bmapi_remap() argument
4655 error = xfs_iread_extents(tp, ip, whichfork); in xfs_bmapi_remap()
4667 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); in xfs_bmapi_remap()
4670 cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork); in xfs_bmapi_remap()
4682 error = xfs_bmap_add_extent_hole_real(tp, ip, whichfork, &icur, in xfs_bmapi_remap()
4687 error = xfs_bmap_btree_to_extents(tp, ip, cur, &logflags, whichfork); in xfs_bmapi_remap()
4696 xfs_trans_log_inode(tp, ip, logflags); in xfs_bmapi_remap()
4994 xfs_trans_t *tp, /* current transaction pointer */ in xfs_bmap_del_extent_real() argument
5041 if (tp->t_blk_res == 0 && in xfs_bmap_del_extent_real()
5063 error = xfs_rtfree_extent(tp, bno, (xfs_extlen_t)len); in xfs_bmap_del_extent_real()
5217 xfs_rmap_unmap_extent(tp, ip, whichfork, del); in xfs_bmap_del_extent_real()
5224 xfs_refcount_decrease_extent(tp, del); in xfs_bmap_del_extent_real()
5226 __xfs_bmap_add_free(tp, del->br_startblock, in xfs_bmap_del_extent_real()
5242 xfs_trans_mod_dquot_byino(tp, ip, qfield, (long)-nblks); in xfs_bmap_del_extent_real()
5257 struct xfs_trans *tp, /* transaction pointer */ in __xfs_bunmapi() argument
5304 if (tp && xfs_is_reflink_inode(ip) && whichfork == XFS_DATA_FORK) in __xfs_bunmapi()
5305 max_len = min(len, xfs_refcount_max_unmap(tp->t_log_res)); in __xfs_bunmapi()
5310 (error = xfs_iread_extents(tp, ip, whichfork))) in __xfs_bunmapi()
5329 cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork); in __xfs_bunmapi()
5339 xfs_trans_ijoin(tp, mp->m_rbmip, XFS_ILOCK_EXCL); in __xfs_bunmapi()
5341 xfs_trans_ijoin(tp, mp->m_rsumip, XFS_ILOCK_EXCL); in __xfs_bunmapi()
5431 ASSERT(tp->t_blk_res > 0); in __xfs_bunmapi()
5442 error = xfs_bmap_add_extent_unwritten_real(tp, ip, in __xfs_bunmapi()
5464 tp->t_blk_res == 0)) { in __xfs_bunmapi()
5501 error = xfs_bmap_add_extent_unwritten_real(tp, in __xfs_bunmapi()
5510 error = xfs_bmap_add_extent_unwritten_real(tp, in __xfs_bunmapi()
5524 error = xfs_bmap_del_extent_real(ip, tp, &icur, cur, in __xfs_bunmapi()
5559 error = xfs_bmap_extents_to_btree(tp, ip, &cur, 0, in __xfs_bunmapi()
5563 error = xfs_bmap_btree_to_extents(tp, ip, cur, &logflags, in __xfs_bunmapi()
5583 xfs_trans_log_inode(tp, ip, logflags); in __xfs_bunmapi()
5595 xfs_trans_t *tp, in xfs_bunmapi() argument
5605 error = __xfs_bunmapi(tp, ip, bno, &len, flags, nexts); in xfs_bunmapi()
5648 struct xfs_trans *tp, in xfs_bmse_merge() argument
5709 error = xfs_bmap_btree_to_extents(tp, ip, cur, logflags, whichfork); in xfs_bmse_merge()
5720 xfs_rmap_unmap_extent(tp, ip, whichfork, got); in xfs_bmse_merge()
5723 xfs_rmap_map_extent(tp, ip, whichfork, &new); in xfs_bmse_merge()
5729 struct xfs_trans *tp, in xfs_bmap_shift_update_extent() argument
5764 xfs_rmap_unmap_extent(tp, ip, whichfork, &prev); in xfs_bmap_shift_update_extent()
5765 xfs_rmap_map_extent(tp, ip, whichfork, got); in xfs_bmap_shift_update_extent()
5771 struct xfs_trans *tp, in xfs_bmap_collapse_extents() argument
5798 error = xfs_iread_extents(tp, ip, whichfork); in xfs_bmap_collapse_extents()
5804 cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork); in xfs_bmap_collapse_extents()
5825 error = xfs_bmse_merge(tp, ip, whichfork, in xfs_bmap_collapse_extents()
5839 error = xfs_bmap_shift_update_extent(tp, ip, whichfork, &icur, &got, in xfs_bmap_collapse_extents()
5855 xfs_trans_log_inode(tp, ip, logflags); in xfs_bmap_collapse_extents()
5887 struct xfs_trans *tp, in xfs_bmap_insert_extents() argument
5915 error = xfs_iread_extents(tp, ip, whichfork); in xfs_bmap_insert_extents()
5921 cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork); in xfs_bmap_insert_extents()
5965 error = xfs_bmap_shift_update_extent(tp, ip, whichfork, &icur, &got, in xfs_bmap_insert_extents()
5981 xfs_trans_log_inode(tp, ip, logflags); in xfs_bmap_insert_extents()
5993 struct xfs_trans *tp, in xfs_bmap_split_extent() argument
6019 error = xfs_iread_extents(tp, ip, whichfork); in xfs_bmap_split_extent()
6038 cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork); in xfs_bmap_split_extent()
6090 error = xfs_bmap_extents_to_btree(tp, ip, &cur, 0, in xfs_bmap_split_extent()
6102 xfs_trans_log_inode(tp, ip, logflags); in xfs_bmap_split_extent()
6118 struct xfs_trans *tp, in __xfs_bmap_add() argument
6126 trace_xfs_bmap_defer(tp->t_mountp, in __xfs_bmap_add()
6127 XFS_FSB_TO_AGNO(tp->t_mountp, bmap->br_startblock), in __xfs_bmap_add()
6129 XFS_FSB_TO_AGBNO(tp->t_mountp, bmap->br_startblock), in __xfs_bmap_add()
6142 xfs_defer_add(tp, XFS_DEFER_OPS_TYPE_BMAP, &bi->bi_list); in __xfs_bmap_add()
6149 struct xfs_trans *tp, in xfs_bmap_map_extent() argument
6156 __xfs_bmap_add(tp, XFS_BMAP_MAP, ip, XFS_DATA_FORK, PREV); in xfs_bmap_map_extent()
6162 struct xfs_trans *tp, in xfs_bmap_unmap_extent() argument
6169 __xfs_bmap_add(tp, XFS_BMAP_UNMAP, ip, XFS_DATA_FORK, PREV); in xfs_bmap_unmap_extent()
6178 struct xfs_trans *tp, in xfs_bmap_finish_one() argument
6189 ASSERT(tp->t_firstblock == NULLFSBLOCK); in xfs_bmap_finish_one()
6191 trace_xfs_bmap_deferred(tp->t_mountp, in xfs_bmap_finish_one()
6192 XFS_FSB_TO_AGNO(tp->t_mountp, startblock), type, in xfs_bmap_finish_one()
6193 XFS_FSB_TO_AGBNO(tp->t_mountp, startblock), in xfs_bmap_finish_one()
6199 if (XFS_TEST_ERROR(false, tp->t_mountp, in xfs_bmap_finish_one()
6205 error = xfs_bmapi_remap(tp, ip, startoff, *blockcount, in xfs_bmap_finish_one()
6210 error = __xfs_bunmapi(tp, ip, startoff, blockcount, in xfs_bmap_finish_one()