Lines Matching refs:log
36 struct xlog *log) in xlog_cil_ticket_alloc() argument
40 tic = xlog_ticket_alloc(log, 0, 1, XFS_TRANSACTION, 0); in xlog_cil_ticket_alloc()
62 struct xlog *log) in xlog_cil_init_post_recovery() argument
64 log->l_cilp->xc_ctx->ticket = xlog_cil_ticket_alloc(log); in xlog_cil_init_post_recovery()
65 log->l_cilp->xc_ctx->sequence = 1; in xlog_cil_init_post_recovery()
125 struct xlog *log, in xlog_cil_alloc_shadow_bufs() argument
225 struct xlog *log, in xfs_cil_prepare_item() argument
266 lv->lv_item->li_seq = log->l_cilp->xc_ctx->sequence; in xfs_cil_prepare_item()
299 struct xlog *log, in xlog_cil_insert_format_items() argument
374 xfs_cil_prepare_item(log, lv, old_lv, diff_len, diff_iovecs); in xlog_cil_insert_format_items()
387 struct xlog *log, in xlog_cil_insert_items() argument
390 struct xfs_cil *cil = log->l_cilp; in xlog_cil_insert_items()
404 xlog_cil_insert_format_items(log, tp, &len, &diff_iovecs); in xlog_cil_insert_items()
431 iclog_space = log->l_iclog_size - log->l_iclog_hsize; in xlog_cil_insert_items()
436 split_res *= log->l_iclog_hsize + sizeof(struct xlog_op_header); in xlog_cil_insert_items()
450 xfs_warn(log->l_mp, "Transaction log reservation overrun:"); in xlog_cil_insert_items()
451 xfs_warn(log->l_mp, in xlog_cil_insert_items()
454 xfs_warn(log->l_mp, " split region headers: %d bytes", in xlog_cil_insert_items()
456 xfs_warn(log->l_mp, " ctx ticket: %d bytes", ctx_res); in xlog_cil_insert_items()
483 xfs_force_shutdown(log->l_mp, SHUTDOWN_LOG_IO_ERROR); in xlog_cil_insert_items()
646 struct xlog *log = cil->xc_log; in xlog_cil_push_work() local
661 new_ctx->ticket = xlog_cil_ticket_alloc(log); in xlog_cil_push_work()
814 error = xlog_write(log, &lvhdr, tic, &ctx->start_lsn, NULL, 0, true); in xlog_cil_push_work()
830 if (XLOG_FORCED_SHUTDOWN(log)) { in xlog_cil_push_work()
852 error = xlog_commit_record(log, tic, &commit_iclog, &commit_lsn); in xlog_cil_push_work()
856 xfs_log_ticket_ungrant(log, tic); in xlog_cil_push_work()
889 xfs_log_ticket_ungrant(log, tic); in xlog_cil_push_work()
891 ASSERT(XLOG_FORCED_SHUTDOWN(log)); in xlog_cil_push_work()
904 struct xlog *log) __releases(cil->xc_ctx_lock) in xlog_cil_push_background() argument
906 struct xfs_cil *cil = log->l_cilp; in xlog_cil_push_background()
918 if (cil->xc_ctx->space_used < XLOG_CIL_SPACE_LIMIT(log)) { in xlog_cil_push_background()
926 queue_work(log->l_mp->m_cil_workqueue, &cil->xc_push_work); in xlog_cil_push_background()
947 if (cil->xc_ctx->space_used >= XLOG_CIL_BLOCKING_SPACE_LIMIT(log) || in xlog_cil_push_background()
949 trace_xfs_log_cil_wait(log, cil->xc_ctx->ticket); in xlog_cil_push_background()
950 ASSERT(cil->xc_ctx->space_used < log->l_logsize); in xlog_cil_push_background()
967 struct xlog *log, in xlog_cil_push_now() argument
970 struct xfs_cil *cil = log->l_cilp; in xlog_cil_push_now()
991 queue_work(log->l_mp->m_cil_workqueue, &cil->xc_push_work); in xlog_cil_push_now()
997 struct xlog *log) in xlog_cil_empty() argument
999 struct xfs_cil *cil = log->l_cilp; in xlog_cil_empty()
1024 struct xlog *log, in xlog_cil_commit() argument
1029 struct xfs_cil *cil = log->l_cilp; in xlog_cil_commit()
1037 xlog_cil_alloc_shadow_bufs(log, tp); in xlog_cil_commit()
1042 xlog_cil_insert_items(log, tp); in xlog_cil_commit()
1044 if (regrant && !XLOG_FORCED_SHUTDOWN(log)) in xlog_cil_commit()
1045 xfs_log_ticket_regrant(log, tp->t_ticket); in xlog_cil_commit()
1047 xfs_log_ticket_ungrant(log, tp->t_ticket); in xlog_cil_commit()
1072 xlog_cil_push_background(log); in xlog_cil_commit()
1087 struct xlog *log, in xlog_cil_force_seq() argument
1090 struct xfs_cil *cil = log->l_cilp; in xlog_cil_force_seq()
1102 xlog_cil_push_now(log, sequence); in xlog_cil_force_seq()
1117 if (XLOG_FORCED_SHUTDOWN(log)) in xlog_cil_force_seq()
1202 struct xlog *log) in xlog_cil_init() argument
1233 cil->xc_log = log; in xlog_cil_init()
1234 log->l_cilp = cil; in xlog_cil_init()
1240 struct xlog *log) in xlog_cil_destroy() argument
1242 if (log->l_cilp->xc_ctx) { in xlog_cil_destroy()
1243 if (log->l_cilp->xc_ctx->ticket) in xlog_cil_destroy()
1244 xfs_log_ticket_put(log->l_cilp->xc_ctx->ticket); in xlog_cil_destroy()
1245 kmem_free(log->l_cilp->xc_ctx); in xlog_cil_destroy()
1248 ASSERT(list_empty(&log->l_cilp->xc_cil)); in xlog_cil_destroy()
1249 kmem_free(log->l_cilp); in xlog_cil_destroy()