Lines Matching refs:ticket
33 struct xlog_ticket *ticket,
67 struct xlog_ticket *ticket,
91 struct xlog_ticket *ticket);
95 struct xlog_ticket *ticket);
501 struct xlog_ticket *ticket, in xfs_log_done() argument
513 (((ticket->t_flags & XLOG_TIC_INITED) == 0) && in xfs_log_done()
514 (xlog_commit_record(log, ticket, iclog, &lsn)))) { in xfs_log_done()
521 trace_xfs_log_done_nonperm(log, ticket); in xfs_log_done()
527 xlog_ungrant_log_space(log, ticket); in xfs_log_done()
529 trace_xfs_log_done_perm(log, ticket); in xfs_log_done()
531 xlog_regrant_reserve_log_space(log, ticket); in xfs_log_done()
536 ticket->t_flags |= XLOG_TIC_INITED; in xfs_log_done()
539 xfs_log_ticket_put(ticket); in xfs_log_done()
1598 struct xlog_ticket *ticket, in xlog_commit_record() argument
1615 error = xlog_write(log, &vec, ticket, commitlsnp, iclog, in xlog_commit_record()
2064 struct xlog_ticket *ticket) in xlog_print_tic_res() argument
2067 uint ophdr_spc = ticket->t_res_num_ophdrs * (uint)sizeof(xlog_op_header_t); in xlog_print_tic_res()
2097 ticket->t_unit_res); in xlog_print_tic_res()
2099 ticket->t_curr_res); in xlog_print_tic_res()
2101 ticket->t_res_arr_sum, ticket->t_res_o_flow); in xlog_print_tic_res()
2103 ticket->t_res_num_ophdrs, ophdr_spc); in xlog_print_tic_res()
2105 ticket->t_res_arr_sum + ticket->t_res_o_flow + ophdr_spc); in xlog_print_tic_res()
2107 ticket->t_res_num); in xlog_print_tic_res()
2109 for (i = 0; i < ticket->t_res_num; i++) { in xlog_print_tic_res()
2110 uint r_type = ticket->t_res_arr[i].r_type; in xlog_print_tic_res()
2114 ticket->t_res_arr[i].r_len); in xlog_print_tic_res()
2174 struct xlog_ticket *ticket, in xlog_write_calc_vec_length() argument
2183 if (ticket->t_flags & XLOG_TIC_INITED) in xlog_write_calc_vec_length()
2197 xlog_tic_add_region(ticket, vecp->i_len, vecp->i_type); in xlog_write_calc_vec_length()
2201 ticket->t_res_num_ophdrs += headers; in xlog_write_calc_vec_length()
2214 struct xlog_ticket *ticket) in xlog_write_start_rec() argument
2216 if (!(ticket->t_flags & XLOG_TIC_INITED)) in xlog_write_start_rec()
2219 ophdr->oh_tid = cpu_to_be32(ticket->t_tid); in xlog_write_start_rec()
2220 ophdr->oh_clientid = ticket->t_clientid; in xlog_write_start_rec()
2225 ticket->t_flags &= ~XLOG_TIC_INITED; in xlog_write_start_rec()
2234 struct xlog_ticket *ticket, in xlog_write_setup_ophdr() argument
2237 ophdr->oh_tid = cpu_to_be32(ticket->t_tid); in xlog_write_setup_ophdr()
2238 ophdr->oh_clientid = ticket->t_clientid; in xlog_write_setup_ophdr()
2257 ophdr->oh_clientid, ticket); in xlog_write_setup_ophdr()
2272 struct xlog_ticket *ticket, in xlog_write_setup_copy() argument
2307 ticket->t_curr_res -= sizeof(struct xlog_op_header); in xlog_write_setup_copy()
2308 ticket->t_res_num_ophdrs++; in xlog_write_setup_copy()
2402 struct xlog_ticket *ticket, in xlog_write() argument
2421 len = xlog_write_calc_vec_length(ticket, log_vector); in xlog_write()
2428 if (ticket->t_flags & XLOG_TIC_INITED) in xlog_write()
2429 ticket->t_curr_res -= sizeof(xlog_op_header_t); in xlog_write()
2436 ticket->t_curr_res -= sizeof(xlog_op_header_t); in xlog_write()
2438 if (ticket->t_curr_res < 0) { in xlog_write()
2441 xlog_print_tic_res(log->l_mp, ticket); in xlog_write()
2452 error = xlog_state_get_iclog_space(log, len, &iclog, ticket, in xlog_write()
2487 start_rec_copy = xlog_write_start_rec(ptr, ticket); in xlog_write()
2494 ophdr = xlog_write_setup_ophdr(log, ptr, ticket, flags); in xlog_write()
2501 len += xlog_write_setup_copy(ticket, ophdr, in xlog_write()
2999 struct xlog_ticket *ticket, in xlog_state_get_iclog_space() argument
3035 ticket->t_curr_res -= log->l_iclog_hsize; in xlog_state_get_iclog_space()
3036 xlog_tic_add_region(ticket, in xlog_state_get_iclog_space()
3108 struct xlog_ticket *ticket) in xlog_regrant_reserve_log_space() argument
3110 trace_xfs_log_regrant_reserve_enter(log, ticket); in xlog_regrant_reserve_log_space()
3112 if (ticket->t_cnt > 0) in xlog_regrant_reserve_log_space()
3113 ticket->t_cnt--; in xlog_regrant_reserve_log_space()
3116 ticket->t_curr_res); in xlog_regrant_reserve_log_space()
3118 ticket->t_curr_res); in xlog_regrant_reserve_log_space()
3119 ticket->t_curr_res = ticket->t_unit_res; in xlog_regrant_reserve_log_space()
3120 xlog_tic_reset_res(ticket); in xlog_regrant_reserve_log_space()
3122 trace_xfs_log_regrant_reserve_sub(log, ticket); in xlog_regrant_reserve_log_space()
3125 if (ticket->t_cnt > 0) in xlog_regrant_reserve_log_space()
3129 ticket->t_unit_res); in xlog_regrant_reserve_log_space()
3131 trace_xfs_log_regrant_reserve_exit(log, ticket); in xlog_regrant_reserve_log_space()
3133 ticket->t_curr_res = ticket->t_unit_res; in xlog_regrant_reserve_log_space()
3134 xlog_tic_reset_res(ticket); in xlog_regrant_reserve_log_space()
3155 struct xlog_ticket *ticket) in xlog_ungrant_log_space() argument
3159 if (ticket->t_cnt > 0) in xlog_ungrant_log_space()
3160 ticket->t_cnt--; in xlog_ungrant_log_space()
3162 trace_xfs_log_ungrant_enter(log, ticket); in xlog_ungrant_log_space()
3163 trace_xfs_log_ungrant_sub(log, ticket); in xlog_ungrant_log_space()
3169 bytes = ticket->t_curr_res; in xlog_ungrant_log_space()
3170 if (ticket->t_cnt > 0) { in xlog_ungrant_log_space()
3171 ASSERT(ticket->t_flags & XLOG_TIC_PERM_RESERV); in xlog_ungrant_log_space()
3172 bytes += ticket->t_unit_res*ticket->t_cnt; in xlog_ungrant_log_space()
3178 trace_xfs_log_ungrant_exit(log, ticket); in xlog_ungrant_log_space()
3558 xlog_ticket_t *ticket) in xfs_log_ticket_put() argument
3560 ASSERT(atomic_read(&ticket->t_ref) > 0); in xfs_log_ticket_put()
3561 if (atomic_dec_and_test(&ticket->t_ref)) in xfs_log_ticket_put()
3562 kmem_zone_free(xfs_log_ticket_zone, ticket); in xfs_log_ticket_put()
3567 xlog_ticket_t *ticket) in xfs_log_ticket_get() argument
3569 ASSERT(atomic_read(&ticket->t_ref) > 0); in xfs_log_ticket_get()
3570 atomic_inc(&ticket->t_ref); in xfs_log_ticket_get()
3571 return ticket; in xfs_log_ticket_get()