Lines Matching defs:tic

162 	struct xlog_ticket	*tic;
165 list_for_each_entry(tic, &head->waiters, t_queue)
166 wake_up_process(tic->t_task);
174 struct xlog_ticket *tic)
177 ASSERT(tic->t_flags & XLOG_TIC_PERM_RESERV);
178 return tic->t_unit_res;
180 if (tic->t_flags & XLOG_TIC_PERM_RESERV)
181 return tic->t_unit_res * tic->t_cnt;
183 return tic->t_unit_res;
193 struct xlog_ticket *tic;
197 list_for_each_entry(tic, &head->waiters, t_queue) {
220 need_bytes = xlog_ticket_reservation(log, head, tic);
228 trace_xfs_log_grant_wake_up(log, tic);
229 wake_up_process(tic->t_task);
240 struct xlog_ticket *tic,
244 list_add_tail(&tic->t_queue, &head->waiters);
256 trace_xfs_log_grant_sleep(log, tic);
258 trace_xfs_log_grant_wake(log, tic);
265 list_del_init(&tic->t_queue);
268 list_del_init(&tic->t_queue);
293 struct xlog_ticket *tic,
307 *need_bytes = xlog_ticket_reservation(log, head, tic);
313 error = xlog_grant_head_wait(log, head, tic,
319 error = xlog_grant_head_wait(log, head, tic, *need_bytes);
327 xlog_tic_reset_res(xlog_ticket_t *tic)
329 tic->t_res_num = 0;
330 tic->t_res_arr_sum = 0;
331 tic->t_res_num_ophdrs = 0;
335 xlog_tic_add_region(xlog_ticket_t *tic, uint len, uint type)
337 if (tic->t_res_num == XLOG_TIC_LEN_MAX) {
339 tic->t_res_o_flow += tic->t_res_arr_sum;
340 tic->t_res_num = 0;
341 tic->t_res_arr_sum = 0;
344 tic->t_res_arr[tic->t_res_num].r_len = len;
345 tic->t_res_arr[tic->t_res_num].r_type = type;
346 tic->t_res_arr_sum += len;
347 tic->t_res_num++;
375 struct xlog_ticket *tic)
392 tic->t_tid++;
394 xlog_grant_push_ail(log, tic->t_unit_res);
396 tic->t_curr_res = tic->t_unit_res;
397 xlog_tic_reset_res(tic);
399 if (tic->t_cnt > 0)
402 trace_xfs_log_regrant(log, tic);
404 error = xlog_grant_head_check(log, &log->l_write_head, tic,
410 trace_xfs_log_regrant_exit(log, tic);
420 tic->t_curr_res = 0;
421 tic->t_cnt = 0; /* ungrant will give back unit_res * t_cnt. */
443 struct xlog_ticket *tic;
455 tic = xlog_ticket_alloc(log, unit_bytes, cnt, client, permanent);
456 *ticp = tic;
458 xlog_grant_push_ail(log, tic->t_cnt ? tic->t_unit_res * tic->t_cnt
459 : tic->t_unit_res);
461 trace_xfs_log_reserve(log, tic);
463 error = xlog_grant_head_check(log, &log->l_reserve_head, tic,
470 trace_xfs_log_reserve_exit(log, tic);
480 tic->t_curr_res = 0;
481 tic->t_cnt = 0; /* ungrant will give back unit_res * t_cnt. */
851 struct xlog_ticket *tic = NULL;
856 error = xfs_log_reserve(mp, 600, 1, &tic, XFS_LOG, 0);
860 error = xlog_write_unmount_record(log, tic, &lsn, flags);
880 if (tic) {
881 trace_xfs_log_umount_write(log, tic);
882 xfs_log_ticket_ungrant(log, tic);
3447 struct xlog_ticket *tic;
3450 tic = kmem_cache_zalloc(xfs_log_ticket_zone, GFP_NOFS | __GFP_NOFAIL);
3454 atomic_set(&tic->t_ref, 1);
3455 tic->t_task = current;
3456 INIT_LIST_HEAD(&tic->t_queue);
3457 tic->t_unit_res = unit_res;
3458 tic->t_curr_res = unit_res;
3459 tic->t_cnt = cnt;
3460 tic->t_ocnt = cnt;
3461 tic->t_tid = prandom_u32();
3462 tic->t_clientid = client;
3464 tic->t_flags |= XLOG_TIC_PERM_RESERV;
3466 xlog_tic_reset_res(tic);
3468 return tic;