• Home
  • Raw
  • Download

Lines Matching refs:ctx

391 	struct xfs_cil_ctx	*ctx = cil->xc_ctx;  in xlog_cil_insert_items()  local
411 ctx->nvecs += diff_iovecs; in xlog_cil_insert_items()
415 list_splice_init(&tp->t_busy, &ctx->busy_extents); in xlog_cil_insert_items()
424 if (ctx->ticket->t_curr_res == 0) { in xlog_cil_insert_items()
425 ctx_res = ctx->ticket->t_unit_res; in xlog_cil_insert_items()
426 ctx->ticket->t_curr_res = ctx_res; in xlog_cil_insert_items()
432 if (len > 0 && (ctx->space_used / iclog_space != in xlog_cil_insert_items()
433 (ctx->space_used + len) / iclog_space)) { in xlog_cil_insert_items()
437 ctx->ticket->t_unit_res += split_res; in xlog_cil_insert_items()
438 ctx->ticket->t_curr_res += split_res; in xlog_cil_insert_items()
443 ctx->space_used += len; in xlog_cil_insert_items()
503 struct xfs_cil_ctx *ctx = in xlog_discard_endio_work() local
505 struct xfs_mount *mp = ctx->cil->xc_log->l_mp; in xlog_discard_endio_work()
507 xfs_extent_busy_clear(mp, &ctx->busy_extents, false); in xlog_discard_endio_work()
508 kmem_free(ctx); in xlog_discard_endio_work()
520 struct xfs_cil_ctx *ctx = bio->bi_private; in xlog_discard_endio() local
522 INIT_WORK(&ctx->discard_endio_work, xlog_discard_endio_work); in xlog_discard_endio()
523 queue_work(xfs_discard_wq, &ctx->discard_endio_work); in xlog_discard_endio()
530 struct xfs_cil_ctx *ctx) in xlog_discard_busy_extents() argument
532 struct list_head *list = &ctx->busy_extents; in xlog_discard_busy_extents()
560 bio->bi_private = ctx; in xlog_discard_busy_extents()
564 xlog_discard_endio_work(&ctx->discard_endio_work); in xlog_discard_busy_extents()
576 struct xfs_cil_ctx *ctx) in xlog_cil_committed() argument
578 struct xfs_mount *mp = ctx->cil->xc_log->l_mp; in xlog_cil_committed()
579 bool abort = XLOG_FORCED_SHUTDOWN(ctx->cil->xc_log); in xlog_cil_committed()
589 spin_lock(&ctx->cil->xc_push_lock); in xlog_cil_committed()
590 wake_up_all(&ctx->cil->xc_commit_wait); in xlog_cil_committed()
591 spin_unlock(&ctx->cil->xc_push_lock); in xlog_cil_committed()
594 xfs_trans_committed_bulk(ctx->cil->xc_log->l_ailp, ctx->lv_chain, in xlog_cil_committed()
595 ctx->start_lsn, abort); in xlog_cil_committed()
597 xfs_extent_busy_sort(&ctx->busy_extents); in xlog_cil_committed()
598 xfs_extent_busy_clear(mp, &ctx->busy_extents, in xlog_cil_committed()
601 spin_lock(&ctx->cil->xc_push_lock); in xlog_cil_committed()
602 list_del(&ctx->committing); in xlog_cil_committed()
603 spin_unlock(&ctx->cil->xc_push_lock); in xlog_cil_committed()
605 xlog_cil_free_logvec(ctx->lv_chain); in xlog_cil_committed()
607 if (!list_empty(&ctx->busy_extents)) in xlog_cil_committed()
608 xlog_discard_busy_extents(mp, ctx); in xlog_cil_committed()
610 kmem_free(ctx); in xlog_cil_committed()
617 struct xfs_cil_ctx *ctx; in xlog_cil_process_committed() local
619 while ((ctx = list_first_entry_or_null(list, in xlog_cil_process_committed()
621 list_del(&ctx->iclog_entry); in xlog_cil_process_committed()
622 xlog_cil_committed(ctx); in xlog_cil_process_committed()
648 struct xfs_cil_ctx *ctx; in xlog_cil_push_work() local
664 ctx = cil->xc_ctx; in xlog_cil_push_work()
668 ASSERT(push_seq <= ctx->sequence); in xlog_cil_push_work()
723 list_add(&ctx->committing, &cil->xc_committing); in xlog_cil_push_work()
740 if (!ctx->lv_chain) in xlog_cil_push_work()
741 ctx->lv_chain = item->li_lv; in xlog_cil_push_work()
757 new_ctx->sequence = ctx->sequence + 1; in xlog_cil_push_work()
800 tic = ctx->ticket; in xlog_cil_push_work()
812 lvhdr.lv_next = ctx->lv_chain; in xlog_cil_push_work()
814 error = xlog_write(log, &lvhdr, tic, &ctx->start_lsn, NULL, 0, true); in xlog_cil_push_work()
839 if (new_ctx->sequence >= ctx->sequence) in xlog_cil_push_work()
865 list_add_tail(&ctx->iclog_entry, &commit_iclog->ic_callbacks); in xlog_cil_push_work()
874 ctx->commit_lsn = commit_lsn; in xlog_cil_push_work()
892 xlog_cil_committed(ctx); in xlog_cil_push_work()
1091 struct xfs_cil_ctx *ctx; in xlog_cil_force_seq() local
1111 list_for_each_entry(ctx, &cil->xc_committing, committing) { in xlog_cil_force_seq()
1119 if (ctx->sequence > sequence) in xlog_cil_force_seq()
1121 if (!ctx->commit_lsn) { in xlog_cil_force_seq()
1129 if (ctx->sequence != sequence) in xlog_cil_force_seq()
1132 commit_lsn = ctx->commit_lsn; in xlog_cil_force_seq()
1205 struct xfs_cil_ctx *ctx; in xlog_cil_init() local
1211 ctx = kmem_zalloc(sizeof(*ctx), KM_MAYFAIL); in xlog_cil_init()
1212 if (!ctx) { in xlog_cil_init()
1226 INIT_LIST_HEAD(&ctx->committing); in xlog_cil_init()
1227 INIT_LIST_HEAD(&ctx->busy_extents); in xlog_cil_init()
1228 ctx->sequence = 1; in xlog_cil_init()
1229 ctx->cil = cil; in xlog_cil_init()
1230 cil->xc_ctx = ctx; in xlog_cil_init()
1231 cil->xc_current_sequence = ctx->sequence; in xlog_cil_init()