Lines Matching refs: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);
2035 struct xlog_ticket *ticket)
2048 * If we have a ticket, account for the roundoff via the ticket
2052 if (ticket) {
2053 ticket->t_curr_res -= roundoff;
2153 struct xlog_ticket *ticket)
2155 xfs_warn(mp, "ticket reservation summary:");
2156 xfs_warn(mp, " unit res = %d bytes", ticket->t_unit_res);
2157 xfs_warn(mp, " current res = %d bytes", ticket->t_curr_res);
2158 xfs_warn(mp, " original count = %d", ticket->t_ocnt);
2159 xfs_warn(mp, " remaining count = %d", ticket->t_cnt);
2172 /* dump core transaction and ticket info */
2240 struct xlog_ticket *ticket,
2260 ophdr->oh_tid = cpu_to_be32(ticket->t_tid);
2268 struct xlog_ticket *ticket,
2282 error = xlog_state_release_iclog(log, iclog, ticket);
2287 error = xlog_state_get_iclog_space(log, len, &iclog, ticket,
2306 struct xlog_ticket *ticket,
2337 error = xlog_write_get_more_iclog_space(ticket,
2347 ophdr->oh_tid = cpu_to_be32(ticket->t_tid);
2384 * needs to be accounted to the ticket as the space it
2388 error = xlog_write_get_more_iclog_space(ticket,
2396 ophdr->oh_tid = cpu_to_be32(ticket->t_tid);
2401 ticket->t_curr_res -= sizeof(struct xlog_op_header);
2479 struct xlog_ticket *ticket,
2490 if (ticket->t_curr_res < 0) {
2492 "ctx ticket reservation ran out. Need to up reservation");
2493 xlog_print_tic_res(log->l_mp, ticket);
2497 error = xlog_state_get_iclog_space(log, len, &iclog, ticket,
2519 error = xlog_write_partial(lv, ticket, &iclog,
2530 xlog_write_full(lv, ticket, iclog, &log_offset,
2544 error = xlog_state_release_iclog(log, iclog, ticket);
2899 struct xlog_ticket *ticket,
2935 ticket->t_curr_res -= log->l_iclog_hsize;
2964 error = xlog_state_release_iclog(log, iclog, ticket);
2991 * The first cnt-1 times a ticket goes through here we don't need to move the
3000 struct xlog_ticket *ticket)
3002 trace_xfs_log_ticket_regrant(log, ticket);
3004 if (ticket->t_cnt > 0)
3005 ticket->t_cnt--;
3008 ticket->t_curr_res);
3010 ticket->t_curr_res);
3011 ticket->t_curr_res = ticket->t_unit_res;
3013 trace_xfs_log_ticket_regrant_sub(log, ticket);
3016 if (!ticket->t_cnt) {
3018 ticket->t_unit_res);
3019 trace_xfs_log_ticket_regrant_exit(log, ticket);
3021 ticket->t_curr_res = ticket->t_unit_res;
3024 xfs_log_ticket_put(ticket);
3033 * space remaining in the current reservation part of the ticket. If the
3034 * ticket contains a permanent reservation, there may be left over space which
3044 struct xlog_ticket *ticket)
3048 trace_xfs_log_ticket_ungrant(log, ticket);
3050 if (ticket->t_cnt > 0)
3051 ticket->t_cnt--;
3053 trace_xfs_log_ticket_ungrant_sub(log, ticket);
3056 * If this is a permanent reservation ticket, we may be able to free
3059 bytes = ticket->t_curr_res;
3060 if (ticket->t_cnt > 0) {
3061 ASSERT(ticket->t_flags & XLOG_TIC_PERM_RESERV);
3062 bytes += ticket->t_unit_res*ticket->t_cnt;
3068 trace_xfs_log_ticket_ungrant_exit(log, ticket);
3071 xfs_log_ticket_put(ticket);
3385 * Free a used ticket when its refcount falls to zero.
3389 xlog_ticket_t *ticket)
3391 ASSERT(atomic_read(&ticket->t_ref) > 0);
3392 if (atomic_dec_and_test(&ticket->t_ref))
3393 kmem_cache_free(xfs_log_ticket_cache, ticket);
3398 xlog_ticket_t *ticket)
3400 ASSERT(atomic_read(&ticket->t_ref) > 0);
3401 atomic_inc(&ticket->t_ref);
3402 return ticket;
3407 * required for a log ticket.
3507 * Allocate and initialise a new log ticket.