• 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:tic

100 xlog_ins_ticketq(struct xlog_ticket **qp, struct xlog_ticket *tic)
103 tic->t_next = (*qp);
104 tic->t_prev = (*qp)->t_prev;
105 (*qp)->t_prev->t_next = tic;
106 (*qp)->t_prev = tic;
108 tic->t_prev = tic->t_next = tic;
109 *qp = tic;
112 tic->t_flags |= XLOG_TIC_IN_Q;
116 xlog_del_ticketq(struct xlog_ticket **qp, struct xlog_ticket *tic)
118 if (tic == tic->t_next) {
121 *qp = tic->t_next;
122 tic->t_next->t_prev = tic->t_prev;
123 tic->t_prev->t_next = tic->t_next;
126 tic->t_next = tic->t_prev = NULL;
127 tic->t_flags &= ~XLOG_TIC_IN_Q;
179 xlog_tic_reset_res(xlog_ticket_t *tic)
181 tic->t_res_num = 0;
182 tic->t_res_arr_sum = 0;
183 tic->t_res_num_ophdrs = 0;
187 xlog_tic_add_region(xlog_ticket_t *tic, uint len, uint type)
189 if (tic->t_res_num == XLOG_TIC_LEN_MAX) {
191 tic->t_res_o_flow += tic->t_res_arr_sum;
192 tic->t_res_num = 0;
193 tic->t_res_arr_sum = 0;
196 tic->t_res_arr[tic->t_res_num].r_len = len;
197 tic->t_res_arr[tic->t_res_num].r_type = type;
198 tic->t_res_arr_sum += len;
199 tic->t_res_num++;
513 xlog_ticket_t *tic = NULL;
538 error = xfs_log_reserve(mp, 600, 1, &tic,
560 tic->t_flags = 0;
561 error = xlog_write(log, &vec, tic, &lsn,
595 if (tic) {
596 trace_xfs_log_umount_write(log, tic);
597 xlog_ungrant_log_space(log, tic);
598 xfs_log_ticket_put(tic);
670 * of the ticket (tic). It is not a requirement that all writes for a given
681 struct xlog_ticket *tic,
694 error = xlog_write(log, &vec, tic, start_lsn, NULL, 0);
704 xlog_ticket_t *tic;
727 if ((tic = log->l_write_headq)) {
736 ASSERT(tic->t_flags & XLOG_TIC_PERM_RESERV);
738 if (free_bytes < tic->t_unit_res && tail_lsn != 1)
741 free_bytes -= tic->t_unit_res;
742 sv_signal(&tic->t_wait);
743 tic = tic->t_next;
744 } while (tic != log->l_write_headq);
746 if ((tic = log->l_reserve_headq)) {
755 if (tic->t_flags & XLOG_TIC_PERM_RESERV)
756 need_bytes = tic->t_unit_res*tic->t_cnt;
758 need_bytes = tic->t_unit_res;
763 sv_signal(&tic->t_wait);
764 tic = tic->t_next;
765 } while (tic != log->l_reserve_headq);
2545 xlog_ticket_t *tic)
2562 trace_xfs_log_grant_enter(log, tic);
2566 xlog_ins_ticketq(&log->l_reserve_headq, tic);
2568 trace_xfs_log_grant_sleep1(log, tic);
2578 sv_wait(&tic->t_wait, PINOD|PLTWAIT, &log->l_grant_lock, s);
2583 trace_xfs_log_grant_wake1(log, tic);
2586 if (tic->t_flags & XFS_LOG_PERM_RESERV)
2587 need_bytes = tic->t_unit_res*tic->t_ocnt;
2589 need_bytes = tic->t_unit_res;
2598 if ((tic->t_flags & XLOG_TIC_IN_Q) == 0)
2599 xlog_ins_ticketq(&log->l_reserve_headq, tic);
2601 trace_xfs_log_grant_sleep2(log, tic);
2608 sv_wait(&tic->t_wait, PINOD|PLTWAIT, &log->l_grant_lock, s);
2614 trace_xfs_log_grant_wake2(log, tic);
2617 } else if (tic->t_flags & XLOG_TIC_IN_Q)
2618 xlog_del_ticketq(&log->l_reserve_headq, tic);
2635 trace_xfs_log_grant_exit(log, tic);
2641 if (tic->t_flags & XLOG_TIC_IN_Q)
2642 xlog_del_ticketq(&log->l_reserve_headq, tic);
2644 trace_xfs_log_grant_error(log, tic);
2651 tic->t_curr_res = 0;
2652 tic->t_cnt = 0; /* ungrant will give back unit_res * t_cnt. */
2665 xlog_ticket_t *tic)
2673 tic->t_curr_res = tic->t_unit_res;
2674 xlog_tic_reset_res(tic);
2676 if (tic->t_cnt > 0)
2686 trace_xfs_log_regrant_write_enter(log, tic);
2697 need_bytes = tic->t_unit_res;
2712 if ((tic->t_flags & XLOG_TIC_IN_Q) == 0)
2713 xlog_ins_ticketq(&log->l_write_headq, tic);
2715 trace_xfs_log_regrant_write_sleep1(log, tic);
2722 sv_wait(&tic->t_wait, PINOD|PLTWAIT,
2725 /* If we're shutting down, this tic is already
2731 trace_xfs_log_regrant_write_wake1(log, tic);
2742 if ((tic->t_flags & XLOG_TIC_IN_Q) == 0)
2743 xlog_ins_ticketq(&log->l_write_headq, tic);
2749 trace_xfs_log_regrant_write_sleep2(log, tic);
2751 sv_wait(&tic->t_wait, PINOD|PLTWAIT, &log->l_grant_lock, s);
2753 /* If we're shutting down, this tic is already off the queue */
2758 trace_xfs_log_regrant_write_wake2(log, tic);
2760 } else if (tic->t_flags & XLOG_TIC_IN_Q)
2761 xlog_del_ticketq(&log->l_write_headq, tic);
2773 trace_xfs_log_regrant_write_exit(log, tic);
2781 if (tic->t_flags & XLOG_TIC_IN_Q)
2782 xlog_del_ticketq(&log->l_reserve_headq, tic);
2784 trace_xfs_log_regrant_write_error(log, tic);
2791 tic->t_curr_res = 0;
2792 tic->t_cnt = 0; /* ungrant will give back unit_res * t_cnt. */
3359 struct xlog_ticket *tic;
3363 tic = kmem_zone_zalloc(xfs_log_ticket_zone, alloc_flags);
3364 if (!tic)
3449 atomic_set(&tic->t_ref, 1);
3450 tic->t_unit_res = unit_bytes;
3451 tic->t_curr_res = unit_bytes;
3452 tic->t_cnt = cnt;
3453 tic->t_ocnt = cnt;
3454 tic->t_tid = random32();
3455 tic->t_clientid = client;
3456 tic->t_flags = XLOG_TIC_INITED;
3457 tic->t_trans_type = 0;
3459 tic->t_flags |= XLOG_TIC_PERM_RESERV;
3460 sv_init(&tic->t_wait, SV_DEFAULT, "logtick");
3462 xlog_tic_reset_res(tic);
3464 return tic;
3693 xlog_ticket_t *tic;
3764 if ((tic = log->l_reserve_headq)) {
3766 sv_signal(&tic->t_wait);
3767 tic = tic->t_next;
3768 } while (tic != log->l_reserve_headq);
3771 if ((tic = log->l_write_headq)) {
3773 sv_signal(&tic->t_wait);
3774 tic = tic->t_next;
3775 } while (tic != log->l_write_headq);