Lines Matching defs:ticket

51 	struct xlog_ticket	*ticket,
61 struct xlog_ticket *ticket);
96 * CIL context ticket.
323 * Atomically get the log space required for a log ticket.
325 * Once a ticket gets put onto head->waiters, it will only return after the
334 * only need to take that lock if we are going to add the ticket to the queue
335 * and sleep. We can avoid taking the lock if the ticket was never added to
415 * This is a new transaction on the ticket, so we need to change the
442 * If we are failing, make sure the ticket doesn't have any current
443 * reservations. We don't want to add this back when the ticket/
452 * Reserve log space and return a ticket corresponding to the reservation.
499 * If we are failing, make sure the ticket doesn't have any current
500 * reservations. We don't want to add this back when the ticket/
572 struct xlog_ticket *ticket)
619 xlog_sync(log, iclog, ticket);
737 * space grant counters are, we can initialise the permanent ticket
903 * Write out an unmount record using the ticket provided. We have to account for
904 * the data space used in the unmount ticket as this write is not done from a
910 struct xlog_ticket *ticket)
918 .oh_tid = cpu_to_be32(ticket->t_tid),
942 ticket->t_curr_res -= sizeof(unmount_rec);
944 return xlog_write(log, NULL, &lv_chain, ticket, reg.i_len);
2037 struct xlog_ticket *ticket)
2050 * If we have a ticket, account for the roundoff via the ticket
2054 if (ticket) {
2055 ticket->t_curr_res -= roundoff;
2155 struct xlog_ticket *ticket)
2157 xfs_warn(mp, "ticket reservation summary:");
2158 xfs_warn(mp, " unit res = %d bytes", ticket->t_unit_res);
2159 xfs_warn(mp, " current res = %d bytes", ticket->t_curr_res);
2160 xfs_warn(mp, " original count = %d", ticket->t_ocnt);
2161 xfs_warn(mp, " remaining count = %d", ticket->t_cnt);
2174 /* dump core transaction and ticket info */
2242 struct xlog_ticket *ticket,
2262 ophdr->oh_tid = cpu_to_be32(ticket->t_tid);
2270 struct xlog_ticket *ticket,
2284 error = xlog_state_release_iclog(log, iclog, ticket);
2289 error = xlog_state_get_iclog_space(log, len, &iclog, ticket,
2308 struct xlog_ticket *ticket,
2339 error = xlog_write_get_more_iclog_space(ticket,
2349 ophdr->oh_tid = cpu_to_be32(ticket->t_tid);
2386 * needs to be accounted to the ticket as the space it
2390 error = xlog_write_get_more_iclog_space(ticket,
2398 ophdr->oh_tid = cpu_to_be32(ticket->t_tid);
2403 ticket->t_curr_res -= sizeof(struct xlog_op_header);
2481 struct xlog_ticket *ticket,
2492 if (ticket->t_curr_res < 0) {
2494 "ctx ticket reservation ran out. Need to up reservation");
2495 xlog_print_tic_res(log->l_mp, ticket);
2499 error = xlog_state_get_iclog_space(log, len, &iclog, ticket,
2521 error = xlog_write_partial(lv, ticket, &iclog,
2532 xlog_write_full(lv, ticket, iclog, &log_offset,
2546 error = xlog_state_release_iclog(log, iclog, ticket);
2901 struct xlog_ticket *ticket,
2937 ticket->t_curr_res -= log->l_iclog_hsize;
2966 error = xlog_state_release_iclog(log, iclog, ticket);
2993 * The first cnt-1 times a ticket goes through here we don't need to move the
3002 struct xlog_ticket *ticket)
3004 trace_xfs_log_ticket_regrant(log, ticket);
3006 if (ticket->t_cnt > 0)
3007 ticket->t_cnt--;
3010 ticket->t_curr_res);
3012 ticket->t_curr_res);
3013 ticket->t_curr_res = ticket->t_unit_res;
3015 trace_xfs_log_ticket_regrant_sub(log, ticket);
3018 if (!ticket->t_cnt) {
3020 ticket->t_unit_res);
3021 trace_xfs_log_ticket_regrant_exit(log, ticket);
3023 ticket->t_curr_res = ticket->t_unit_res;
3026 xfs_log_ticket_put(ticket);
3035 * space remaining in the current reservation part of the ticket. If the
3036 * ticket contains a permanent reservation, there may be left over space which
3046 struct xlog_ticket *ticket)
3050 trace_xfs_log_ticket_ungrant(log, ticket);
3052 if (ticket->t_cnt > 0)
3053 ticket->t_cnt--;
3055 trace_xfs_log_ticket_ungrant_sub(log, ticket);
3058 * If this is a permanent reservation ticket, we may be able to free
3061 bytes = ticket->t_curr_res;
3062 if (ticket->t_cnt > 0) {
3063 ASSERT(ticket->t_flags & XLOG_TIC_PERM_RESERV);
3064 bytes += ticket->t_unit_res*ticket->t_cnt;
3070 trace_xfs_log_ticket_ungrant_exit(log, ticket);
3073 xfs_log_ticket_put(ticket);
3387 * Free a used ticket when its refcount falls to zero.
3391 xlog_ticket_t *ticket)
3393 ASSERT(atomic_read(&ticket->t_ref) > 0);
3394 if (atomic_dec_and_test(&ticket->t_ref))
3395 kmem_cache_free(xfs_log_ticket_cache, ticket);
3400 xlog_ticket_t *ticket)
3402 ASSERT(atomic_read(&ticket->t_ref) > 0);
3403 atomic_inc(&ticket->t_ref);
3404 return ticket;
3409 * required for a log ticket.
3509 * Allocate and initialise a new log ticket.