• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/fs/xfs/

Lines Matching defs:ticket

52 STATIC int	 xlog_commit_record(xfs_mount_t *mp, xlog_ticket_t *ticket,
73 xlog_ticket_t *ticket,
96 xlog_ticket_t *ticket);
98 xlog_ticket_t *ticket);
100 xlog_ticket_t *ticket);
103 /* local ticket functions */
110 STATIC void xlog_ticket_put(xlog_t *log, xlog_ticket_t *ticket);
139 /* ticket counts are 1 byte each */
264 * This routine is called when a user of a log manager ticket is done with
265 * the reservation. If the ticket was ever used, then a commit record for
268 * a given ticket. If the ticket was one with a permanent reservation, then
284 xlog_ticket_t *ticket = (xfs_log_ticket_t) xtic;
290 * If we get an error, just continue and give back the log ticket.
292 (((ticket->t_flags & XLOG_TIC_INITED) == 0) &&
293 (xlog_commit_record(mp, ticket,
296 if (ticket->t_flags & XLOG_TIC_PERM_RESERV) {
302 if ((ticket->t_flags & XLOG_TIC_PERM_RESERV) == 0 ||
305 * Release ticket if not permanent reservation or a specific
308 xlog_trace_loggrant(log, ticket, "xfs_log_done: (non-permanent)");
309 xlog_ungrant_log_space(log, ticket);
310 xlog_state_put_ticket(log, ticket);
312 xlog_trace_loggrant(log, ticket, "xfs_log_done: (permanent)");
313 xlog_regrant_reserve_log_space(log, ticket);
316 /* If this ticket was a permanent reservation and we aren't
320 if ((ticket->t_flags & XLOG_TIC_PERM_RESERV) &&
322 ticket->t_flags |= XLOG_TIC_INITED;
411 * 1. Reserve an amount of on-disk log space and return a ticket corresponding
424 xfs_log_ticket_t *ticket,
441 if (*ticket != NULL) {
443 internal_ticket = (xlog_ticket_t *)*ticket;
444 xlog_trace_loggrant(log, internal_ticket, "xfs_log_reserve: existing ticket (permanent trans)");
452 *ticket = internal_ticket;
455 "xfs_log_reserve: create new ticket (permanent trans)" :
456 "xfs_log_reserve: create new ticket");
713 * of the ticket (tic). It is not a requirement that all writes for a given
1242 * ticket. Return the lsn of the commit record.
1246 xlog_ticket_t *ticket,
1258 if ((error = xlog_write(mp, reg, 1, ticket, commitlsnp,
1591 xlog_print_tic_res(xfs_mount_t *mp, xlog_ticket_t *ticket)
1594 uint ophdr_spc = ticket->t_res_num_ophdrs * (uint)sizeof(xlog_op_header_t);
1670 ((ticket->t_trans_type <= 0 ||
1671 ticket->t_trans_type > XFS_TRANS_TYPE_MAX) ?
1672 "bad-trans-type" : trans_type_str[ticket->t_trans_type-1]),
1673 ticket->t_trans_type,
1674 ticket->t_unit_res,
1675 ticket->t_curr_res,
1676 ticket->t_res_arr_sum, ticket->t_res_o_flow,
1677 ticket->t_res_num_ophdrs, ophdr_spc,
1678 ticket->t_res_arr_sum +
1679 ticket->t_res_o_flow + ophdr_spc,
1680 ticket->t_res_num);
1682 for (i = 0; i < ticket->t_res_num; i++) {
1683 uint r_type = ticket->t_res_arr[i].r_type;
1689 ticket->t_res_arr[i].r_len);
1743 xlog_ticket_t *ticket = (xlog_ticket_t *)tic;
1766 if (ticket->t_flags & XLOG_TIC_INITED) { /* acct for start rec of xact */
1768 XLOG_TIC_ADD_OPHDR(ticket);
1773 XLOG_TIC_ADD_OPHDR(ticket);
1775 XLOG_TIC_ADD_REGION(ticket, reg[index].i_len, reg[index].i_type);
1779 if (ticket->t_curr_res < len) {
1780 xlog_print_tic_res(mp, ticket);
1792 ticket->t_curr_res -= len;
1795 if ((error = xlog_state_get_iclog_space(log, len, &iclog, ticket,
1818 if (ticket->t_flags & XLOG_TIC_INITED) {
1820 INT_SET(logop_head->oh_tid, ARCH_CONVERT, ticket->t_tid);
1821 logop_head->oh_clientid = ticket->t_clientid;
1825 ticket->t_flags &= ~XLOG_TIC_INITED; /* clear bit */
1834 INT_SET(logop_head->oh_tid, ARCH_CONVERT, ticket->t_tid);
1835 logop_head->oh_clientid = ticket->t_clientid;
1856 "Bad XFS transaction clientid 0x%x in ticket 0x%p",
1883 ticket->t_curr_res -= sizeof(xlog_op_header_t);
1884 XLOG_TIC_ADD_OPHDR(ticket);
2342 xlog_ticket_t *ticket,
2381 ticket->t_curr_res -= log->l_iclog_hsize;
2382 XLOG_TIC_ADD_REGION(ticket,
2437 * Atomically get the log space required for a log ticket.
2439 * Once a ticket gets put onto the reserveq, it will only return after
2542 * If we are failing, make sure the ticket doesn't have any
2544 * the ticket/transaction gets cancelled.
2679 * If we are failing, make sure the ticket doesn't have any
2681 * the ticket/transaction gets cancelled.
2699 xlog_ticket_t *ticket)
2703 xlog_trace_loggrant(log, ticket,
2705 if (ticket->t_cnt > 0)
2706 ticket->t_cnt--;
2709 xlog_grant_sub_space(log, ticket->t_curr_res);
2710 ticket->t_curr_res = ticket->t_unit_res;
2711 XLOG_TIC_RESET_RES(ticket);
2712 xlog_trace_loggrant(log, ticket,
2717 if (ticket->t_cnt > 0) {
2722 xlog_grant_add_space_reserve(log, ticket->t_unit_res);
2723 xlog_trace_loggrant(log, ticket,
2727 ticket->t_curr_res = ticket->t_unit_res;
2728 XLOG_TIC_RESET_RES(ticket);
2738 * space remaining in the current reservation part of the ticket. If the
2739 * ticket contains a permanent reservation, there may be left over space which
2748 xlog_ticket_t *ticket)
2752 if (ticket->t_cnt > 0)
2753 ticket->t_cnt--;
2756 xlog_trace_loggrant(log, ticket, "xlog_ungrant_log_space: enter");
2758 xlog_grant_sub_space(log, ticket->t_curr_res);
2760 xlog_trace_loggrant(log, ticket, "xlog_ungrant_log_space: sub current");
2762 /* If this is a permanent reservation ticket, we may be able to free
2765 if (ticket->t_cnt > 0) {
2766 ASSERT(ticket->t_flags & XLOG_TIC_PERM_RESERV);
2767 xlog_grant_sub_space(log, ticket->t_unit_res*ticket->t_cnt);
2770 xlog_trace_loggrant(log, ticket, "xlog_ungrant_log_space: exit");
2778 * Atomically put back used ticket.
3185 /* Attach 1st ticket to Q, so we can keep track of allocated memory */
3192 /* Next ticket becomes first ticket attached to ticket free list */
3217 * Put ticket into free list
3223 xlog_ticket_t *ticket)
3225 sv_destroy(&ticket->t_sema);
3232 ticket->t_next = NULL;
3234 log->l_tail->t_next = ticket;
3237 log->l_freelist = ticket;
3239 log->l_tail = ticket;
3245 * Grab ticket off freelist or allocation some more