Lines Matching full:dfp

244 	struct xfs_defer_pending	*dfp)  in xfs_defer_create_done()  argument
249 if (!dfp->dfp_intent) in xfs_defer_create_done()
260 lip = dfp->dfp_ops->create_done(tp, dfp->dfp_intent, dfp->dfp_count); in xfs_defer_create_done()
267 dfp->dfp_done = lip; in xfs_defer_create_done()
278 struct xfs_defer_pending *dfp, in xfs_defer_create_intent() argument
283 if (dfp->dfp_intent) in xfs_defer_create_intent()
286 lip = dfp->dfp_ops->create_intent(tp, &dfp->dfp_work, dfp->dfp_count, in xfs_defer_create_intent()
296 dfp->dfp_intent = lip; in xfs_defer_create_intent()
312 struct xfs_defer_pending *dfp; in xfs_defer_create_intents() local
315 list_for_each_entry(dfp, &tp->t_dfops, dfp_list) { in xfs_defer_create_intents()
318 trace_xfs_defer_create_intent(tp->t_mountp, dfp); in xfs_defer_create_intents()
319 ret2 = xfs_defer_create_intent(tp, dfp, true); in xfs_defer_create_intents()
330 struct xfs_defer_pending *dfp) in xfs_defer_pending_abort() argument
332 trace_xfs_defer_pending_abort(mp, dfp); in xfs_defer_pending_abort()
334 if (dfp->dfp_intent && !dfp->dfp_done) { in xfs_defer_pending_abort()
335 dfp->dfp_ops->abort_intent(dfp->dfp_intent); in xfs_defer_pending_abort()
336 dfp->dfp_intent = NULL; in xfs_defer_pending_abort()
343 struct xfs_defer_pending *dfp) in xfs_defer_pending_cancel_work() argument
348 trace_xfs_defer_cancel_list(mp, dfp); in xfs_defer_pending_cancel_work()
350 list_del(&dfp->dfp_list); in xfs_defer_pending_cancel_work()
351 list_for_each_safe(pwi, n, &dfp->dfp_work) { in xfs_defer_pending_cancel_work()
353 dfp->dfp_count--; in xfs_defer_pending_cancel_work()
354 trace_xfs_defer_cancel_item(mp, dfp, pwi); in xfs_defer_pending_cancel_work()
355 dfp->dfp_ops->cancel_item(pwi); in xfs_defer_pending_cancel_work()
357 ASSERT(dfp->dfp_count == 0); in xfs_defer_pending_cancel_work()
358 kmem_cache_free(xfs_defer_pending_cache, dfp); in xfs_defer_pending_cancel_work()
366 struct xfs_defer_pending *dfp; in xfs_defer_pending_abort_list() local
369 list_for_each_entry(dfp, dop_list, dfp_list) in xfs_defer_pending_abort_list()
370 xfs_defer_pending_abort(mp, dfp); in xfs_defer_pending_abort_list()
496 struct xfs_defer_pending *dfp; in xfs_defer_cancel_list() local
503 list_for_each_entry_safe(dfp, pli, dop_list, dfp_list) in xfs_defer_cancel_list()
504 xfs_defer_pending_cancel_work(mp, dfp); in xfs_defer_cancel_list()
510 struct xfs_defer_pending *dfp) in xfs_defer_relog_intent() argument
514 xfs_defer_create_done(tp, dfp); in xfs_defer_relog_intent()
516 lip = dfp->dfp_ops->relog_intent(tp, dfp->dfp_intent, dfp->dfp_done); in xfs_defer_relog_intent()
521 dfp->dfp_done = NULL; in xfs_defer_relog_intent()
522 dfp->dfp_intent = lip; in xfs_defer_relog_intent()
536 struct xfs_defer_pending *dfp; in xfs_defer_relog() local
542 list_for_each_entry(dfp, dfops, dfp_list) { in xfs_defer_relog()
550 if (dfp->dfp_intent == NULL || in xfs_defer_relog()
551 xfs_log_item_in_current_chkpt(dfp->dfp_intent)) in xfs_defer_relog()
564 if (XFS_LSN_CMP(dfp->dfp_intent->li_lsn, threshold_lsn) >= 0) in xfs_defer_relog()
567 trace_xfs_defer_relog_intent((*tpp)->t_mountp, dfp); in xfs_defer_relog()
570 xfs_defer_relog_intent(*tpp, dfp); in xfs_defer_relog()
581 struct xfs_defer_pending *dfp) in xfs_defer_finish_one() argument
583 const struct xfs_defer_op_type *ops = dfp->dfp_ops; in xfs_defer_finish_one()
588 trace_xfs_defer_pending_finish(tp->t_mountp, dfp); in xfs_defer_finish_one()
590 xfs_defer_create_done(tp, dfp); in xfs_defer_finish_one()
591 list_for_each_safe(li, n, &dfp->dfp_work) { in xfs_defer_finish_one()
593 dfp->dfp_count--; in xfs_defer_finish_one()
594 trace_xfs_defer_finish_item(tp->t_mountp, dfp, li); in xfs_defer_finish_one()
595 error = ops->finish_item(tp, dfp->dfp_done, li, &state); in xfs_defer_finish_one()
605 list_add(li, &dfp->dfp_work); in xfs_defer_finish_one()
606 dfp->dfp_count++; in xfs_defer_finish_one()
607 dfp->dfp_done = NULL; in xfs_defer_finish_one()
608 dfp->dfp_intent = NULL; in xfs_defer_finish_one()
609 ret = xfs_defer_create_intent(tp, dfp, false); in xfs_defer_finish_one()
618 /* Done with the dfp, free it. */ in xfs_defer_finish_one()
619 list_del(&dfp->dfp_list); in xfs_defer_finish_one()
620 kmem_cache_free(xfs_defer_pending_cache, dfp); in xfs_defer_finish_one()
633 struct xfs_defer_pending *dfp; in xfs_defer_isolate_paused() local
636 list_for_each_entry_safe(dfp, pli, &tp->t_dfops, dfp_list) { in xfs_defer_isolate_paused()
637 if (!(dfp->dfp_flags & XFS_DEFER_PAUSED)) in xfs_defer_isolate_paused()
640 list_move_tail(&dfp->dfp_list, paused_list); in xfs_defer_isolate_paused()
641 trace_xfs_defer_isolate_paused(tp->t_mountp, dfp); in xfs_defer_isolate_paused()
657 struct xfs_defer_pending *dfp = NULL; in xfs_defer_finish_noroll() local
687 if (has_intents || dfp) { in xfs_defer_finish_noroll()
703 dfp = list_first_entry_or_null(&dop_pending, in xfs_defer_finish_noroll()
705 if (!dfp) in xfs_defer_finish_noroll()
707 error = xfs_defer_finish_one(*tp, dfp); in xfs_defer_finish_noroll()
733 struct xfs_defer_pending *dfp; in xfs_defer_finish() local
755 list_for_each_entry(dfp, &(*tp)->t_dfops, dfp_list) in xfs_defer_finish()
756 ASSERT(dfp->dfp_flags & XFS_DEFER_PAUSED); in xfs_defer_finish()
782 struct xfs_defer_pending *dfp = NULL; in xfs_defer_find_last() local
788 dfp = list_last_entry(&tp->t_dfops, struct xfs_defer_pending, in xfs_defer_find_last()
792 if (dfp->dfp_ops != ops) in xfs_defer_find_last()
794 return dfp; in xfs_defer_find_last()
803 struct xfs_defer_pending *dfp, in xfs_defer_can_append() argument
807 if (dfp->dfp_intent) in xfs_defer_can_append()
811 if (dfp->dfp_flags & XFS_DEFER_PAUSED) in xfs_defer_can_append()
815 if (ops->max_items && dfp->dfp_count >= ops->max_items) in xfs_defer_can_append()
827 struct xfs_defer_pending *dfp; in xfs_defer_alloc() local
829 dfp = kmem_cache_zalloc(xfs_defer_pending_cache, in xfs_defer_alloc()
831 dfp->dfp_ops = ops; in xfs_defer_alloc()
832 INIT_LIST_HEAD(&dfp->dfp_work); in xfs_defer_alloc()
833 list_add_tail(&dfp->dfp_list, dfops); in xfs_defer_alloc()
835 return dfp; in xfs_defer_alloc()
845 struct xfs_defer_pending *dfp = NULL; in xfs_defer_add() local
849 dfp = xfs_defer_find_last(tp, ops); in xfs_defer_add()
850 if (!dfp || !xfs_defer_can_append(dfp, ops)) in xfs_defer_add()
851 dfp = xfs_defer_alloc(&tp->t_dfops, ops); in xfs_defer_add()
853 xfs_defer_add_item(dfp, li); in xfs_defer_add()
854 trace_xfs_defer_add_item(tp->t_mountp, dfp, li); in xfs_defer_add()
855 return dfp; in xfs_defer_add()
866 struct xfs_defer_pending *dfp; in xfs_defer_add_barrier() local
871 dfp = xfs_defer_find_last(tp, &xfs_barrier_defer_type); in xfs_defer_add_barrier()
872 if (dfp) in xfs_defer_add_barrier()
877 trace_xfs_defer_add_item(tp->t_mountp, dfp, NULL); in xfs_defer_add_barrier()
890 struct xfs_defer_pending *dfp = xfs_defer_alloc(r_dfops, ops); in xfs_defer_start_recovery() local
892 dfp->dfp_intent = lip; in xfs_defer_start_recovery()
896 * Cancel a deferred work item created to recover a log intent item. @dfp
902 struct xfs_defer_pending *dfp) in xfs_defer_cancel_recovery() argument
904 xfs_defer_pending_abort(mp, dfp); in xfs_defer_cancel_recovery()
905 xfs_defer_pending_cancel_work(mp, dfp); in xfs_defer_cancel_recovery()
912 struct xfs_defer_pending *dfp, in xfs_defer_finish_recovery() argument
915 const struct xfs_defer_op_type *ops = dfp->dfp_ops; in xfs_defer_finish_recovery()
918 /* dfp is freed by recover_work and must not be accessed afterwards */ in xfs_defer_finish_recovery()
919 error = ops->recover_work(dfp, capture_list); in xfs_defer_finish_recovery()
1216 struct xfs_defer_pending *dfp) in xfs_defer_item_pause() argument
1218 ASSERT(!(dfp->dfp_flags & XFS_DEFER_PAUSED)); in xfs_defer_item_pause()
1220 dfp->dfp_flags |= XFS_DEFER_PAUSED; in xfs_defer_item_pause()
1222 trace_xfs_defer_item_pause(tp->t_mountp, dfp); in xfs_defer_item_pause()
1232 struct xfs_defer_pending *dfp) in xfs_defer_item_unpause() argument
1234 ASSERT(dfp->dfp_flags & XFS_DEFER_PAUSED); in xfs_defer_item_unpause()
1236 dfp->dfp_flags &= ~XFS_DEFER_PAUSED; in xfs_defer_item_unpause()
1238 trace_xfs_defer_item_unpause(tp->t_mountp, dfp); in xfs_defer_item_unpause()