Lines Matching refs:tp

201 	struct xfs_trans		*tp,  in xfs_defer_create_intent()  argument
211 lip = ops->create_intent(tp, &dfp->dfp_work, dfp->dfp_count, sort); in xfs_defer_create_intent()
231 struct xfs_trans *tp) in xfs_defer_create_intents() argument
236 list_for_each_entry(dfp, &tp->t_dfops, dfp_list) { in xfs_defer_create_intents()
239 trace_xfs_defer_create_intent(tp->t_mountp, dfp); in xfs_defer_create_intents()
240 ret2 = xfs_defer_create_intent(tp, dfp, true); in xfs_defer_create_intents()
251 struct xfs_trans *tp, in xfs_defer_trans_abort() argument
257 trace_xfs_defer_trans_abort(tp, _RET_IP_); in xfs_defer_trans_abort()
262 trace_xfs_defer_pending_abort(tp->t_mountp, dfp); in xfs_defer_trans_abort()
277 struct xfs_trans *tp) in xfs_defer_save_resources() argument
285 list_for_each_entry(lip, &tp->t_items, li_trans) { in xfs_defer_save_resources()
299 xfs_trans_dirty_buf(tp, bli->bli_buf); in xfs_defer_save_resources()
311 xfs_trans_log_inode(tp, ili->ili_inode, in xfs_defer_save_resources()
327 struct xfs_trans *tp, in xfs_defer_restore_resources() argument
334 xfs_trans_ijoin(tp, dres->dr_ip[i], 0); in xfs_defer_restore_resources()
338 xfs_trans_bjoin(tp, dres->dr_bp[i]); in xfs_defer_restore_resources()
340 xfs_trans_ordered_buf(tp, dres->dr_bp[i]); in xfs_defer_restore_resources()
341 xfs_trans_bhold(tp, dres->dr_bp[i]); in xfs_defer_restore_resources()
466 struct xfs_trans *tp, in xfs_defer_finish_one() argument
474 trace_xfs_defer_pending_finish(tp->t_mountp, dfp); in xfs_defer_finish_one()
476 dfp->dfp_done = ops->create_done(tp, dfp->dfp_intent, dfp->dfp_count); in xfs_defer_finish_one()
480 trace_xfs_defer_finish_item(tp->t_mountp, dfp, li); in xfs_defer_finish_one()
481 error = ops->finish_item(tp, dfp->dfp_done, li, &state); in xfs_defer_finish_one()
495 ret = xfs_defer_create_intent(tp, dfp, false); in xfs_defer_finish_one()
509 ops->finish_cleanup(tp, state, error); in xfs_defer_finish_one()
523 struct xfs_trans **tp) in xfs_defer_finish_noroll() argument
529 ASSERT((*tp)->t_flags & XFS_TRANS_PERM_LOG_RES); in xfs_defer_finish_noroll()
531 trace_xfs_defer_finish(*tp, _RET_IP_); in xfs_defer_finish_noroll()
534 while (!list_empty(&dop_pending) || !list_empty(&(*tp)->t_dfops)) { in xfs_defer_finish_noroll()
544 int has_intents = xfs_defer_create_intents(*tp); in xfs_defer_finish_noroll()
546 list_splice_init(&(*tp)->t_dfops, &dop_pending); in xfs_defer_finish_noroll()
553 error = xfs_defer_trans_roll(tp); in xfs_defer_finish_noroll()
558 error = xfs_defer_relog(tp, &dop_pending); in xfs_defer_finish_noroll()
565 error = xfs_defer_finish_one(*tp, dfp); in xfs_defer_finish_noroll()
570 trace_xfs_defer_finish_done(*tp, _RET_IP_); in xfs_defer_finish_noroll()
574 xfs_defer_trans_abort(*tp, &dop_pending); in xfs_defer_finish_noroll()
575 xfs_force_shutdown((*tp)->t_mountp, SHUTDOWN_CORRUPT_INCORE); in xfs_defer_finish_noroll()
576 trace_xfs_defer_finish_error(*tp, error); in xfs_defer_finish_noroll()
577 xfs_defer_cancel_list((*tp)->t_mountp, &dop_pending); in xfs_defer_finish_noroll()
578 xfs_defer_cancel(*tp); in xfs_defer_finish_noroll()
584 struct xfs_trans **tp) in xfs_defer_finish() argument
592 error = xfs_defer_finish_noroll(tp); in xfs_defer_finish()
595 if ((*tp)->t_flags & XFS_TRANS_DIRTY) { in xfs_defer_finish()
596 error = xfs_defer_trans_roll(tp); in xfs_defer_finish()
598 xfs_force_shutdown((*tp)->t_mountp, in xfs_defer_finish()
605 ASSERT(list_empty(&(*tp)->t_dfops)); in xfs_defer_finish()
606 (*tp)->t_flags &= ~XFS_TRANS_LOWMODE; in xfs_defer_finish()
612 struct xfs_trans *tp) in xfs_defer_cancel() argument
614 struct xfs_mount *mp = tp->t_mountp; in xfs_defer_cancel()
616 trace_xfs_defer_cancel(tp, _RET_IP_); in xfs_defer_cancel()
617 xfs_defer_cancel_list(mp, &tp->t_dfops); in xfs_defer_cancel()
623 struct xfs_trans *tp, in xfs_defer_add() argument
630 ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); in xfs_defer_add()
638 if (!list_empty(&tp->t_dfops)) { in xfs_defer_add()
639 dfp = list_last_entry(&tp->t_dfops, in xfs_defer_add()
653 list_add_tail(&dfp->dfp_list, &tp->t_dfops); in xfs_defer_add()
657 trace_xfs_defer_add_item(tp->t_mountp, dfp, li); in xfs_defer_add()
701 struct xfs_trans *tp) in xfs_defer_ops_capture() argument
707 if (list_empty(&tp->t_dfops)) in xfs_defer_ops_capture()
710 error = xfs_defer_create_intents(tp); in xfs_defer_ops_capture()
720 list_splice_init(&tp->t_dfops, &dfc->dfc_dfops); in xfs_defer_ops_capture()
721 dfc->dfc_tpflags = tp->t_flags & XFS_TRANS_LOWMODE; in xfs_defer_ops_capture()
722 tp->t_flags &= ~XFS_TRANS_LOWMODE; in xfs_defer_ops_capture()
725 dfc->dfc_blkres = tp->t_blk_res - tp->t_blk_res_used; in xfs_defer_ops_capture()
726 dfc->dfc_rtxres = tp->t_rtx_res - tp->t_rtx_res_used; in xfs_defer_ops_capture()
729 dfc->dfc_logres = tp->t_log_res; in xfs_defer_ops_capture()
731 error = xfs_defer_save_resources(&dfc->dfc_held, tp); in xfs_defer_ops_capture()
738 xfs_force_shutdown(tp->t_mountp, SHUTDOWN_CORRUPT_INCORE); in xfs_defer_ops_capture()
786 struct xfs_trans *tp, in xfs_defer_ops_capture_and_commit() argument
789 struct xfs_mount *mp = tp->t_mountp; in xfs_defer_ops_capture_and_commit()
794 dfc = xfs_defer_ops_capture(tp); in xfs_defer_ops_capture_and_commit()
796 xfs_trans_cancel(tp); in xfs_defer_ops_capture_and_commit()
800 return xfs_trans_commit(tp); in xfs_defer_ops_capture_and_commit()
803 error = xfs_trans_commit(tp); in xfs_defer_ops_capture_and_commit()
822 struct xfs_trans *tp, in xfs_defer_ops_continue() argument
827 ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); in xfs_defer_ops_continue()
828 ASSERT(!(tp->t_flags & XFS_TRANS_DIRTY)); in xfs_defer_ops_continue()
841 xfs_defer_restore_resources(tp, &dfc->dfc_held); in xfs_defer_ops_continue()
846 list_splice_init(&dfc->dfc_dfops, &tp->t_dfops); in xfs_defer_ops_continue()
847 tp->t_flags |= dfc->dfc_tpflags; in xfs_defer_ops_continue()