Lines Matching refs:ticket

51 	struct xlog_ticket	*ticket,
61 struct xlog_ticket *ticket);
572 struct xlog_ticket *ticket) in xlog_state_release_iclog() argument
619 xlog_sync(log, iclog, ticket); in xlog_state_release_iclog()
910 struct xlog_ticket *ticket) in xlog_write_unmount_record() argument
918 .oh_tid = cpu_to_be32(ticket->t_tid), in xlog_write_unmount_record()
942 ticket->t_curr_res -= sizeof(unmount_rec); in xlog_write_unmount_record()
944 return xlog_write(log, NULL, &lv_chain, ticket, reg.i_len); in xlog_write_unmount_record()
2036 struct xlog_ticket *ticket) in xlog_sync() argument
2053 if (ticket) { in xlog_sync()
2054 ticket->t_curr_res -= roundoff; in xlog_sync()
2154 struct xlog_ticket *ticket) in xlog_print_tic_res() argument
2157 xfs_warn(mp, " unit res = %d bytes", ticket->t_unit_res); in xlog_print_tic_res()
2158 xfs_warn(mp, " current res = %d bytes", ticket->t_curr_res); in xlog_print_tic_res()
2159 xfs_warn(mp, " original count = %d", ticket->t_ocnt); in xlog_print_tic_res()
2160 xfs_warn(mp, " remaining count = %d", ticket->t_cnt); in xlog_print_tic_res()
2241 struct xlog_ticket *ticket, in xlog_write_full() argument
2261 ophdr->oh_tid = cpu_to_be32(ticket->t_tid); in xlog_write_full()
2269 struct xlog_ticket *ticket, in xlog_write_get_more_iclog_space() argument
2283 error = xlog_state_release_iclog(log, iclog, ticket); in xlog_write_get_more_iclog_space()
2288 error = xlog_state_get_iclog_space(log, len, &iclog, ticket, in xlog_write_get_more_iclog_space()
2307 struct xlog_ticket *ticket, in xlog_write_partial() argument
2338 error = xlog_write_get_more_iclog_space(ticket, in xlog_write_partial()
2348 ophdr->oh_tid = cpu_to_be32(ticket->t_tid); in xlog_write_partial()
2389 error = xlog_write_get_more_iclog_space(ticket, in xlog_write_partial()
2397 ophdr->oh_tid = cpu_to_be32(ticket->t_tid); in xlog_write_partial()
2402 ticket->t_curr_res -= sizeof(struct xlog_op_header); in xlog_write_partial()
2480 struct xlog_ticket *ticket, in xlog_write() argument
2491 if (ticket->t_curr_res < 0) { in xlog_write()
2494 xlog_print_tic_res(log->l_mp, ticket); in xlog_write()
2498 error = xlog_state_get_iclog_space(log, len, &iclog, ticket, in xlog_write()
2520 error = xlog_write_partial(lv, ticket, &iclog, in xlog_write()
2531 xlog_write_full(lv, ticket, iclog, &log_offset, in xlog_write()
2545 error = xlog_state_release_iclog(log, iclog, ticket); in xlog_write()
2900 struct xlog_ticket *ticket, in xlog_state_get_iclog_space() argument
2936 ticket->t_curr_res -= log->l_iclog_hsize; in xlog_state_get_iclog_space()
2965 error = xlog_state_release_iclog(log, iclog, ticket); in xlog_state_get_iclog_space()
3001 struct xlog_ticket *ticket) in xfs_log_ticket_regrant() argument
3003 trace_xfs_log_ticket_regrant(log, ticket); in xfs_log_ticket_regrant()
3005 if (ticket->t_cnt > 0) in xfs_log_ticket_regrant()
3006 ticket->t_cnt--; in xfs_log_ticket_regrant()
3009 ticket->t_curr_res); in xfs_log_ticket_regrant()
3011 ticket->t_curr_res); in xfs_log_ticket_regrant()
3012 ticket->t_curr_res = ticket->t_unit_res; in xfs_log_ticket_regrant()
3014 trace_xfs_log_ticket_regrant_sub(log, ticket); in xfs_log_ticket_regrant()
3017 if (!ticket->t_cnt) { in xfs_log_ticket_regrant()
3019 ticket->t_unit_res); in xfs_log_ticket_regrant()
3020 trace_xfs_log_ticket_regrant_exit(log, ticket); in xfs_log_ticket_regrant()
3022 ticket->t_curr_res = ticket->t_unit_res; in xfs_log_ticket_regrant()
3025 xfs_log_ticket_put(ticket); in xfs_log_ticket_regrant()
3045 struct xlog_ticket *ticket) in xfs_log_ticket_ungrant() argument
3049 trace_xfs_log_ticket_ungrant(log, ticket); in xfs_log_ticket_ungrant()
3051 if (ticket->t_cnt > 0) in xfs_log_ticket_ungrant()
3052 ticket->t_cnt--; in xfs_log_ticket_ungrant()
3054 trace_xfs_log_ticket_ungrant_sub(log, ticket); in xfs_log_ticket_ungrant()
3060 bytes = ticket->t_curr_res; in xfs_log_ticket_ungrant()
3061 if (ticket->t_cnt > 0) { in xfs_log_ticket_ungrant()
3062 ASSERT(ticket->t_flags & XLOG_TIC_PERM_RESERV); in xfs_log_ticket_ungrant()
3063 bytes += ticket->t_unit_res*ticket->t_cnt; in xfs_log_ticket_ungrant()
3069 trace_xfs_log_ticket_ungrant_exit(log, ticket); in xfs_log_ticket_ungrant()
3072 xfs_log_ticket_put(ticket); in xfs_log_ticket_ungrant()
3390 xlog_ticket_t *ticket) in xfs_log_ticket_put() argument
3392 ASSERT(atomic_read(&ticket->t_ref) > 0); in xfs_log_ticket_put()
3393 if (atomic_dec_and_test(&ticket->t_ref)) in xfs_log_ticket_put()
3394 kmem_cache_free(xfs_log_ticket_cache, ticket); in xfs_log_ticket_put()
3399 xlog_ticket_t *ticket) in xfs_log_ticket_get() argument
3401 ASSERT(atomic_read(&ticket->t_ref) > 0); in xfs_log_ticket_get()
3402 atomic_inc(&ticket->t_ref); in xfs_log_ticket_get()
3403 return ticket; in xfs_log_ticket_get()