• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/fs/xfs/

Lines Matching refs:ticket

44 STATIC int	 xlog_commit_record(struct log *log, struct xlog_ticket *ticket,
60 xlog_ticket_t *ticket,
76 xlog_ticket_t *ticket);
78 xlog_ticket_t *ticket);
80 xlog_ticket_t *ticket);
210 * This routine is called when a user of a log manager ticket is done with
211 * the reservation. If the ticket was ever used, then a commit record for
214 * a given ticket. If the ticket was one with a permanent reservation, then
226 struct xlog_ticket *ticket,
236 * If we get an error, just continue and give back the log ticket.
238 (((ticket->t_flags & XLOG_TIC_INITED) == 0) &&
239 (xlog_commit_record(log, ticket, iclog, &lsn)))) {
241 if (ticket->t_flags & XLOG_TIC_PERM_RESERV) {
247 if ((ticket->t_flags & XLOG_TIC_PERM_RESERV) == 0 ||
249 trace_xfs_log_done_nonperm(log, ticket);
252 * Release ticket if not permanent reservation or a specific
255 xlog_ungrant_log_space(log, ticket);
256 xfs_log_ticket_put(ticket);
258 trace_xfs_log_done_perm(log, ticket);
260 xlog_regrant_reserve_log_space(log, ticket);
261 /* If this ticket was a permanent reservation and we aren't
265 ticket->t_flags |= XLOG_TIC_INITED;
312 * 1. Reserve an amount of on-disk log space and return a ticket corresponding
326 struct xlog_ticket **ticket,
343 if (*ticket != NULL) {
345 internal_ticket = *ticket;
348 * this is a new transaction on the ticket, so we need to
368 *ticket = internal_ticket;
451 * space grant counters are, we can initialise the permanent ticket
670 * of the ticket (tic). It is not a requirement that all writes for a given
1201 * ticket. Return the lsn of the commit record.
1206 struct xlog_ticket *ticket,
1223 error = xlog_write(log, &vec, ticket, commitlsnp, iclog,
1547 struct xlog_ticket *ticket)
1550 uint ophdr_spc = ticket->t_res_num_ophdrs * (uint)sizeof(xlog_op_header_t);
1626 ((ticket->t_trans_type <= 0 ||
1627 ticket->t_trans_type > XFS_TRANS_TYPE_MAX) ?
1628 "bad-trans-type" : trans_type_str[ticket->t_trans_type-1]),
1629 ticket->t_trans_type,
1630 ticket->t_unit_res,
1631 ticket->t_curr_res,
1632 ticket->t_res_arr_sum, ticket->t_res_o_flow,
1633 ticket->t_res_num_ophdrs, ophdr_spc,
1634 ticket->t_res_arr_sum +
1635 ticket->t_res_o_flow + ophdr_spc,
1636 ticket->t_res_num);
1638 for (i = 0; i < ticket->t_res_num; i++) {
1639 uint r_type = ticket->t_res_arr[i].r_type;
1645 ticket->t_res_arr[i].r_len);
1659 struct xlog_ticket *ticket,
1668 if (ticket->t_flags & XLOG_TIC_INITED)
1678 xlog_tic_add_region(ticket, vecp->i_len, vecp->i_type);
1682 ticket->t_res_num_ophdrs += headers;
1695 struct xlog_ticket *ticket)
1697 if (!(ticket->t_flags & XLOG_TIC_INITED))
1700 ophdr->oh_tid = cpu_to_be32(ticket->t_tid);
1701 ophdr->oh_clientid = ticket->t_clientid;
1706 ticket->t_flags &= ~XLOG_TIC_INITED;
1715 struct xlog_ticket *ticket,
1718 ophdr->oh_tid = cpu_to_be32(ticket->t_tid);
1719 ophdr->oh_clientid = ticket->t_clientid;
1737 "Bad XFS transaction clientid 0x%x in ticket 0x%p",
1738 ophdr->oh_clientid, ticket);
1753 struct xlog_ticket *ticket,
1788 ticket->t_curr_res -= sizeof(struct xlog_op_header);
1789 ticket->t_res_num_ophdrs++;
1883 struct xlog_ticket *ticket,
1902 len = xlog_write_calc_vec_length(ticket, log_vector);
1909 if (ticket->t_flags & XLOG_TIC_INITED)
1910 ticket->t_curr_res -= sizeof(xlog_op_header_t);
1917 ticket->t_curr_res -= sizeof(xlog_op_header_t);
1919 ticket->t_curr_res -= len;
1921 if (ticket->t_curr_res < 0)
1922 xlog_print_tic_res(log->l_mp, ticket);
1931 error = xlog_state_get_iclog_space(log, len, &iclog, ticket,
1957 start_rec_copy = xlog_write_start_rec(ptr, ticket);
1964 ophdr = xlog_write_setup_ophdr(log, ptr, ticket, flags);
1971 len += xlog_write_setup_copy(ticket, ophdr,
2438 xlog_ticket_t *ticket,
2474 ticket->t_curr_res -= log->l_iclog_hsize;
2475 xlog_tic_add_region(ticket,
2538 * Atomically get the log space required for a log ticket.
2540 * Once a ticket gets put onto the reserveq, it will only return after
2647 * If we are failing, make sure the ticket doesn't have any
2649 * the ticket/transaction gets cancelled.
2787 * If we are failing, make sure the ticket doesn't have any
2789 * the ticket/transaction gets cancelled.
2807 xlog_ticket_t *ticket)
2809 trace_xfs_log_regrant_reserve_enter(log, ticket);
2811 if (ticket->t_cnt > 0)
2812 ticket->t_cnt--;
2815 xlog_grant_sub_space(log, ticket->t_curr_res);
2816 ticket->t_curr_res = ticket->t_unit_res;
2817 xlog_tic_reset_res(ticket);
2819 trace_xfs_log_regrant_reserve_sub(log, ticket);
2824 if (ticket->t_cnt > 0) {
2829 xlog_grant_add_space_reserve(log, ticket->t_unit_res);
2831 trace_xfs_log_regrant_reserve_exit(log, ticket);
2835 ticket->t_curr_res = ticket->t_unit_res;
2836 xlog_tic_reset_res(ticket);
2846 * space remaining in the current reservation part of the ticket. If the
2847 * ticket contains a permanent reservation, there may be left over space which
2856 xlog_ticket_t *ticket)
2858 if (ticket->t_cnt > 0)
2859 ticket->t_cnt--;
2862 trace_xfs_log_ungrant_enter(log, ticket);
2864 xlog_grant_sub_space(log, ticket->t_curr_res);
2866 trace_xfs_log_ungrant_sub(log, ticket);
2868 /* If this is a permanent reservation ticket, we may be able to free
2871 if (ticket->t_cnt > 0) {
2872 ASSERT(ticket->t_flags & XLOG_TIC_PERM_RESERV);
2873 xlog_grant_sub_space(log, ticket->t_unit_res*ticket->t_cnt);
2876 trace_xfs_log_ungrant_exit(log, ticket);
3318 * Free a used ticket when its refcount falls to zero.
3322 xlog_ticket_t *ticket)
3324 ASSERT(atomic_read(&ticket->t_ref) > 0);
3325 if (atomic_dec_and_test(&ticket->t_ref)) {
3326 sv_destroy(&ticket->t_wait);
3327 kmem_zone_free(xfs_log_ticket_zone, ticket);
3333 xlog_ticket_t *ticket)
3335 ASSERT(atomic_read(&ticket->t_ref) > 0);
3336 atomic_inc(&ticket->t_ref);
3337 return ticket;
3348 * Allocate and initialise a new log ticket.