Lines Matching refs:tp
185 struct xfs_trans *tp, in xfs_defer_create_intent() argument
192 dfp->dfp_intent = ops->create_intent(tp, &dfp->dfp_work, in xfs_defer_create_intent()
203 struct xfs_trans *tp) in xfs_defer_create_intents() argument
207 list_for_each_entry(dfp, &tp->t_dfops, dfp_list) { in xfs_defer_create_intents()
208 trace_xfs_defer_create_intent(tp->t_mountp, dfp); in xfs_defer_create_intents()
209 xfs_defer_create_intent(tp, dfp, true); in xfs_defer_create_intents()
216 struct xfs_trans *tp, in xfs_defer_trans_abort() argument
222 trace_xfs_defer_trans_abort(tp, _RET_IP_); in xfs_defer_trans_abort()
227 trace_xfs_defer_pending_abort(tp->t_mountp, dfp); in xfs_defer_trans_abort()
240 struct xfs_trans *tp = *tpp; in xfs_defer_trans_roll() local
253 list_for_each_entry(lip, &tp->t_items, li_trans) { in xfs_defer_trans_roll()
266 xfs_trans_dirty_buf(tp, bli->bli_buf); in xfs_defer_trans_roll()
278 xfs_trans_log_inode(tp, ili->ili_inode, in xfs_defer_trans_roll()
288 trace_xfs_defer_trans_roll(tp, _RET_IP_); in xfs_defer_trans_roll()
298 tp = *tpp; in xfs_defer_trans_roll()
302 xfs_trans_ijoin(tp, iplist[i], 0); in xfs_defer_trans_roll()
306 xfs_trans_bjoin(tp, bplist[i]); in xfs_defer_trans_roll()
308 xfs_trans_ordered_buf(tp, bplist[i]); in xfs_defer_trans_roll()
309 xfs_trans_bhold(tp, bplist[i]); in xfs_defer_trans_roll()
313 trace_xfs_defer_trans_roll_error(tp, error); in xfs_defer_trans_roll()
407 struct xfs_trans *tp, in xfs_defer_finish_one() argument
415 trace_xfs_defer_pending_finish(tp->t_mountp, dfp); in xfs_defer_finish_one()
417 dfp->dfp_done = ops->create_done(tp, dfp->dfp_intent, dfp->dfp_count); in xfs_defer_finish_one()
421 error = ops->finish_item(tp, dfp->dfp_done, li, &state); in xfs_defer_finish_one()
433 xfs_defer_create_intent(tp, dfp, false); in xfs_defer_finish_one()
445 ops->finish_cleanup(tp, state, error); in xfs_defer_finish_one()
459 struct xfs_trans **tp) in xfs_defer_finish_noroll() argument
465 ASSERT((*tp)->t_flags & XFS_TRANS_PERM_LOG_RES); in xfs_defer_finish_noroll()
467 trace_xfs_defer_finish(*tp, _RET_IP_); in xfs_defer_finish_noroll()
470 while (!list_empty(&dop_pending) || !list_empty(&(*tp)->t_dfops)) { in xfs_defer_finish_noroll()
480 xfs_defer_create_intents(*tp); in xfs_defer_finish_noroll()
481 list_splice_init(&(*tp)->t_dfops, &dop_pending); in xfs_defer_finish_noroll()
483 error = xfs_defer_trans_roll(tp); in xfs_defer_finish_noroll()
488 error = xfs_defer_relog(tp, &dop_pending); in xfs_defer_finish_noroll()
494 error = xfs_defer_finish_one(*tp, dfp); in xfs_defer_finish_noroll()
499 trace_xfs_defer_finish_done(*tp, _RET_IP_); in xfs_defer_finish_noroll()
503 xfs_defer_trans_abort(*tp, &dop_pending); in xfs_defer_finish_noroll()
504 xfs_force_shutdown((*tp)->t_mountp, SHUTDOWN_CORRUPT_INCORE); in xfs_defer_finish_noroll()
505 trace_xfs_defer_finish_error(*tp, error); in xfs_defer_finish_noroll()
506 xfs_defer_cancel_list((*tp)->t_mountp, &dop_pending); in xfs_defer_finish_noroll()
507 xfs_defer_cancel(*tp); in xfs_defer_finish_noroll()
513 struct xfs_trans **tp) in xfs_defer_finish() argument
521 error = xfs_defer_finish_noroll(tp); in xfs_defer_finish()
524 if ((*tp)->t_flags & XFS_TRANS_DIRTY) { in xfs_defer_finish()
525 error = xfs_defer_trans_roll(tp); in xfs_defer_finish()
527 xfs_force_shutdown((*tp)->t_mountp, in xfs_defer_finish()
534 ASSERT(list_empty(&(*tp)->t_dfops)); in xfs_defer_finish()
535 (*tp)->t_flags &= ~XFS_TRANS_LOWMODE; in xfs_defer_finish()
541 struct xfs_trans *tp) in xfs_defer_cancel() argument
543 struct xfs_mount *mp = tp->t_mountp; in xfs_defer_cancel()
545 trace_xfs_defer_cancel(tp, _RET_IP_); in xfs_defer_cancel()
546 xfs_defer_cancel_list(mp, &tp->t_dfops); in xfs_defer_cancel()
552 struct xfs_trans *tp, in xfs_defer_add() argument
559 ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); in xfs_defer_add()
567 if (!list_empty(&tp->t_dfops)) { in xfs_defer_add()
568 dfp = list_last_entry(&tp->t_dfops, in xfs_defer_add()
583 list_add_tail(&dfp->dfp_list, &tp->t_dfops); in xfs_defer_add()
630 struct xfs_trans *tp, in xfs_defer_ops_capture() argument
635 if (list_empty(&tp->t_dfops)) in xfs_defer_ops_capture()
643 xfs_defer_create_intents(tp); in xfs_defer_ops_capture()
646 list_splice_init(&tp->t_dfops, &dfc->dfc_dfops); in xfs_defer_ops_capture()
647 dfc->dfc_tpflags = tp->t_flags & XFS_TRANS_LOWMODE; in xfs_defer_ops_capture()
648 tp->t_flags &= ~XFS_TRANS_LOWMODE; in xfs_defer_ops_capture()
651 dfc->dfc_blkres = tp->t_blk_res - tp->t_blk_res_used; in xfs_defer_ops_capture()
652 dfc->dfc_rtxres = tp->t_rtx_res - tp->t_rtx_res_used; in xfs_defer_ops_capture()
655 dfc->dfc_logres = tp->t_log_res; in xfs_defer_ops_capture()
691 struct xfs_trans *tp, in xfs_defer_ops_capture_and_commit() argument
695 struct xfs_mount *mp = tp->t_mountp; in xfs_defer_ops_capture_and_commit()
702 dfc = xfs_defer_ops_capture(tp, capture_ip); in xfs_defer_ops_capture_and_commit()
704 return xfs_trans_commit(tp); in xfs_defer_ops_capture_and_commit()
707 error = xfs_trans_commit(tp); in xfs_defer_ops_capture_and_commit()
726 struct xfs_trans *tp, in xfs_defer_ops_continue() argument
729 ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); in xfs_defer_ops_continue()
730 ASSERT(!(tp->t_flags & XFS_TRANS_DIRTY)); in xfs_defer_ops_continue()
735 xfs_trans_ijoin(tp, dfc->dfc_capture_ip, 0); in xfs_defer_ops_continue()
740 list_splice_init(&dfc->dfc_dfops, &tp->t_dfops); in xfs_defer_ops_continue()
741 tp->t_flags |= dfc->dfc_tpflags; in xfs_defer_ops_continue()