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()
300 struct xfs_trans *tp, in xfs_defer_trans_abort() argument
303 trace_xfs_defer_trans_abort(tp, _RET_IP_); in xfs_defer_trans_abort()
304 xfs_defer_pending_abort_list(tp->t_mountp, dop_pending); in xfs_defer_trans_abort()
314 struct xfs_trans *tp) in xfs_defer_save_resources() argument
322 list_for_each_entry(lip, &tp->t_items, li_trans) { in xfs_defer_save_resources()
336 xfs_trans_dirty_buf(tp, bli->bli_buf); in xfs_defer_save_resources()
348 xfs_trans_log_inode(tp, ili->ili_inode, in xfs_defer_save_resources()
364 struct xfs_trans *tp, in xfs_defer_restore_resources() argument
371 xfs_trans_ijoin(tp, dres->dr_ip[i], 0); in xfs_defer_restore_resources()
375 xfs_trans_bjoin(tp, dres->dr_bp[i]); in xfs_defer_restore_resources()
377 xfs_trans_ordered_buf(tp, dres->dr_bp[i]); in xfs_defer_restore_resources()
378 xfs_trans_bhold(tp, dres->dr_bp[i]); in xfs_defer_restore_resources()
489 struct xfs_trans *tp, in xfs_defer_finish_one() argument
497 trace_xfs_defer_pending_finish(tp->t_mountp, dfp); in xfs_defer_finish_one()
499 dfp->dfp_done = ops->create_done(tp, dfp->dfp_intent, dfp->dfp_count); in xfs_defer_finish_one()
503 trace_xfs_defer_finish_item(tp->t_mountp, dfp, li); in xfs_defer_finish_one()
504 error = ops->finish_item(tp, dfp->dfp_done, li, &state); in xfs_defer_finish_one()
518 ret = xfs_defer_create_intent(tp, dfp, false); in xfs_defer_finish_one()
532 ops->finish_cleanup(tp, state, error); in xfs_defer_finish_one()
546 struct xfs_trans **tp) in xfs_defer_finish_noroll() argument
552 ASSERT((*tp)->t_flags & XFS_TRANS_PERM_LOG_RES); in xfs_defer_finish_noroll()
554 trace_xfs_defer_finish(*tp, _RET_IP_); in xfs_defer_finish_noroll()
557 while (!list_empty(&dop_pending) || !list_empty(&(*tp)->t_dfops)) { in xfs_defer_finish_noroll()
567 int has_intents = xfs_defer_create_intents(*tp); in xfs_defer_finish_noroll()
569 list_splice_init(&(*tp)->t_dfops, &dop_pending); in xfs_defer_finish_noroll()
576 error = xfs_defer_trans_roll(tp); in xfs_defer_finish_noroll()
581 error = xfs_defer_relog(tp, &dop_pending); in xfs_defer_finish_noroll()
588 error = xfs_defer_finish_one(*tp, dfp); in xfs_defer_finish_noroll()
593 trace_xfs_defer_finish_done(*tp, _RET_IP_); in xfs_defer_finish_noroll()
597 xfs_defer_trans_abort(*tp, &dop_pending); in xfs_defer_finish_noroll()
598 xfs_force_shutdown((*tp)->t_mountp, SHUTDOWN_CORRUPT_INCORE); in xfs_defer_finish_noroll()
599 trace_xfs_defer_finish_error(*tp, error); in xfs_defer_finish_noroll()
600 xfs_defer_cancel_list((*tp)->t_mountp, &dop_pending); in xfs_defer_finish_noroll()
601 xfs_defer_cancel(*tp); in xfs_defer_finish_noroll()
607 struct xfs_trans **tp) in xfs_defer_finish() argument
615 error = xfs_defer_finish_noroll(tp); in xfs_defer_finish()
618 if ((*tp)->t_flags & XFS_TRANS_DIRTY) { in xfs_defer_finish()
619 error = xfs_defer_trans_roll(tp); in xfs_defer_finish()
621 xfs_force_shutdown((*tp)->t_mountp, in xfs_defer_finish()
628 ASSERT(list_empty(&(*tp)->t_dfops)); in xfs_defer_finish()
629 (*tp)->t_flags &= ~XFS_TRANS_LOWMODE; in xfs_defer_finish()
635 struct xfs_trans *tp) in xfs_defer_cancel() argument
637 struct xfs_mount *mp = tp->t_mountp; in xfs_defer_cancel()
639 trace_xfs_defer_cancel(tp, _RET_IP_); in xfs_defer_cancel()
640 xfs_defer_cancel_list(mp, &tp->t_dfops); in xfs_defer_cancel()
646 struct xfs_trans *tp, in xfs_defer_add() argument
653 ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); in xfs_defer_add()
661 if (!list_empty(&tp->t_dfops)) { in xfs_defer_add()
662 dfp = list_last_entry(&tp->t_dfops, in xfs_defer_add()
676 list_add_tail(&dfp->dfp_list, &tp->t_dfops); in xfs_defer_add()
680 trace_xfs_defer_add_item(tp->t_mountp, dfp, li); in xfs_defer_add()
757 struct xfs_trans *tp) in xfs_defer_ops_capture() argument
763 if (list_empty(&tp->t_dfops)) in xfs_defer_ops_capture()
766 error = xfs_defer_create_intents(tp); in xfs_defer_ops_capture()
776 list_splice_init(&tp->t_dfops, &dfc->dfc_dfops); in xfs_defer_ops_capture()
777 dfc->dfc_tpflags = tp->t_flags & XFS_TRANS_LOWMODE; in xfs_defer_ops_capture()
778 tp->t_flags &= ~XFS_TRANS_LOWMODE; in xfs_defer_ops_capture()
781 dfc->dfc_blkres = tp->t_blk_res - tp->t_blk_res_used; in xfs_defer_ops_capture()
782 dfc->dfc_rtxres = tp->t_rtx_res - tp->t_rtx_res_used; in xfs_defer_ops_capture()
785 dfc->dfc_logres = tp->t_log_res; in xfs_defer_ops_capture()
787 error = xfs_defer_save_resources(&dfc->dfc_held, tp); in xfs_defer_ops_capture()
794 xfs_force_shutdown(tp->t_mountp, SHUTDOWN_CORRUPT_INCORE); in xfs_defer_ops_capture()
843 struct xfs_trans *tp, in xfs_defer_ops_capture_and_commit() argument
846 struct xfs_mount *mp = tp->t_mountp; in xfs_defer_ops_capture_and_commit()
851 dfc = xfs_defer_ops_capture(tp); in xfs_defer_ops_capture_and_commit()
853 xfs_trans_cancel(tp); in xfs_defer_ops_capture_and_commit()
857 return xfs_trans_commit(tp); in xfs_defer_ops_capture_and_commit()
860 error = xfs_trans_commit(tp); in xfs_defer_ops_capture_and_commit()
879 struct xfs_trans *tp, in xfs_defer_ops_continue() argument
884 ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); in xfs_defer_ops_continue()
885 ASSERT(!(tp->t_flags & XFS_TRANS_DIRTY)); in xfs_defer_ops_continue()
898 xfs_defer_restore_resources(tp, &dfc->dfc_held); in xfs_defer_ops_continue()
903 list_splice_init(&dfc->dfc_dfops, &tp->t_dfops); in xfs_defer_ops_continue()
904 tp->t_flags |= dfc->dfc_tpflags; in xfs_defer_ops_continue()