Lines Matching refs:ticket
49 struct xlog_ticket *ticket,
273 * Atomically get the log space required for a log ticket.
275 * Once a ticket gets put onto head->waiters, it will only return after the
284 * only need to take that lock if we are going to add the ticket to the queue
285 * and sleep. We can avoid taking the lock if the ticket was never added to
387 * This is a new transaction on the ticket, so we need to change the
416 * If we are failing, make sure the ticket doesn't have any current
417 * reservations. We don't want to add this back when the ticket/
426 * Reserve log space and return a ticket corresponding to the reservation.
476 * If we are failing, make sure the ticket doesn't have any current
477 * reservations. We don't want to add this back when the ticket/
682 * space grant counters are, we can initialise the permanent ticket
812 * Write out an unmount record using the ticket provided. We have to account for
813 * the data space used in the unmount ticket as this write is not done from a
819 struct xlog_ticket *ticket,
837 ticket->t_curr_res -= sizeof(ulf);
838 return xlog_write(log, &vec, ticket, lsn, NULL, flags, false);
1462 * ticket to close off a running log write. Return the lsn of the commit record.
1467 struct xlog_ticket *ticket,
1485 error = xlog_write(log, &vec, ticket, lsn, iclog, XLOG_COMMIT_TRANS,
1977 struct xlog_ticket *ticket)
1980 uint ophdr_spc = ticket->t_res_num_ophdrs * (uint)sizeof(xlog_op_header_t);
2015 xfs_warn(mp, "ticket reservation summary:");
2017 ticket->t_unit_res);
2019 ticket->t_curr_res);
2021 ticket->t_res_arr_sum, ticket->t_res_o_flow);
2023 ticket->t_res_num_ophdrs, ophdr_spc);
2025 ticket->t_res_arr_sum + ticket->t_res_o_flow + ophdr_spc);
2027 ticket->t_res_num);
2029 for (i = 0; i < ticket->t_res_num; i++) {
2030 uint r_type = ticket->t_res_arr[i].r_type;
2034 ticket->t_res_arr[i].r_len);
2048 /* dump core transaction and ticket info */
2095 struct xlog_ticket *ticket,
2115 xlog_tic_add_region(ticket, vecp->i_len, vecp->i_type);
2119 ticket->t_res_num_ophdrs += headers;
2128 struct xlog_ticket *ticket)
2130 ophdr->oh_tid = cpu_to_be32(ticket->t_tid);
2131 ophdr->oh_clientid = ticket->t_clientid;
2141 struct xlog_ticket *ticket,
2144 ophdr->oh_tid = cpu_to_be32(ticket->t_tid);
2145 ophdr->oh_clientid = ticket->t_clientid;
2163 "Bad XFS transaction clientid 0x%x in ticket "PTR_FMT,
2164 ophdr->oh_clientid, ticket);
2179 struct xlog_ticket *ticket,
2214 ticket->t_curr_res -= sizeof(struct xlog_op_header);
2215 ticket->t_res_num_ophdrs++;
2320 struct xlog_ticket *ticket,
2344 ticket->t_curr_res -= sizeof(struct xlog_op_header);
2345 if (ticket->t_curr_res < 0) {
2347 "ctx ticket reservation ran out. Need to up reservation");
2348 xlog_print_tic_res(log->l_mp, ticket);
2352 len = xlog_write_calc_vec_length(ticket, log_vector, need_start_rec);
2358 error = xlog_state_get_iclog_space(log, len, &iclog, ticket,
2398 xlog_write_start_rec(ptr, ticket);
2403 ophdr = xlog_write_setup_ophdr(log, ptr, ticket, flags);
2410 len += xlog_write_setup_copy(ticket, ophdr,
2881 struct xlog_ticket *ticket,
2916 ticket->t_curr_res -= log->l_iclog_hsize;
2917 xlog_tic_add_region(ticket,
2978 * The first cnt-1 times a ticket goes through here we don't need to move the
2987 struct xlog_ticket *ticket)
2989 trace_xfs_log_ticket_regrant(log, ticket);
2991 if (ticket->t_cnt > 0)
2992 ticket->t_cnt--;
2995 ticket->t_curr_res);
2997 ticket->t_curr_res);
2998 ticket->t_curr_res = ticket->t_unit_res;
2999 xlog_tic_reset_res(ticket);
3001 trace_xfs_log_ticket_regrant_sub(log, ticket);
3004 if (!ticket->t_cnt) {
3006 ticket->t_unit_res);
3007 trace_xfs_log_ticket_regrant_exit(log, ticket);
3009 ticket->t_curr_res = ticket->t_unit_res;
3010 xlog_tic_reset_res(ticket);
3013 xfs_log_ticket_put(ticket);
3022 * space remaining in the current reservation part of the ticket. If the
3023 * ticket contains a permanent reservation, there may be left over space which
3033 struct xlog_ticket *ticket)
3037 trace_xfs_log_ticket_ungrant(log, ticket);
3039 if (ticket->t_cnt > 0)
3040 ticket->t_cnt--;
3042 trace_xfs_log_ticket_ungrant_sub(log, ticket);
3045 * If this is a permanent reservation ticket, we may be able to free
3048 bytes = ticket->t_curr_res;
3049 if (ticket->t_cnt > 0) {
3050 ASSERT(ticket->t_flags & XLOG_TIC_PERM_RESERV);
3051 bytes += ticket->t_unit_res*ticket->t_cnt;
3057 trace_xfs_log_ticket_ungrant_exit(log, ticket);
3060 xfs_log_ticket_put(ticket);
3319 * Free a used ticket when its refcount falls to zero.
3323 xlog_ticket_t *ticket)
3325 ASSERT(atomic_read(&ticket->t_ref) > 0);
3326 if (atomic_dec_and_test(&ticket->t_ref))
3327 kmem_cache_free(xfs_log_ticket_zone, ticket);
3332 xlog_ticket_t *ticket)
3334 ASSERT(atomic_read(&ticket->t_ref) > 0);
3335 atomic_inc(&ticket->t_ref);
3336 return ticket;
3341 * required for a log ticket.
3437 * Allocate and initialise a new log ticket.