Lines Matching defs:tic
212 struct xlog_ticket *tic;
215 list_for_each_entry(tic, &head->waiters, t_queue)
216 wake_up_process(tic->t_task);
224 struct xlog_ticket *tic)
227 ASSERT(tic->t_flags & XLOG_TIC_PERM_RESERV);
228 return tic->t_unit_res;
231 if (tic->t_flags & XLOG_TIC_PERM_RESERV)
232 return tic->t_unit_res * tic->t_cnt;
234 return tic->t_unit_res;
243 struct xlog_ticket *tic;
247 list_for_each_entry(tic, &head->waiters, t_queue) {
270 need_bytes = xlog_ticket_reservation(log, head, tic);
278 trace_xfs_log_grant_wake_up(log, tic);
279 wake_up_process(tic->t_task);
290 struct xlog_ticket *tic,
294 list_add_tail(&tic->t_queue, &head->waiters);
306 trace_xfs_log_grant_sleep(log, tic);
308 trace_xfs_log_grant_wake(log, tic);
315 list_del_init(&tic->t_queue);
318 list_del_init(&tic->t_queue);
343 struct xlog_ticket *tic,
357 *need_bytes = xlog_ticket_reservation(log, head, tic);
363 error = xlog_grant_head_wait(log, head, tic,
369 error = xlog_grant_head_wait(log, head, tic, *need_bytes);
403 struct xlog_ticket *tic)
420 tic->t_tid++;
422 xlog_grant_push_ail(log, tic->t_unit_res);
424 tic->t_curr_res = tic->t_unit_res;
425 if (tic->t_cnt > 0)
428 trace_xfs_log_regrant(log, tic);
430 error = xlog_grant_head_check(log, &log->l_write_head, tic,
436 trace_xfs_log_regrant_exit(log, tic);
446 tic->t_curr_res = 0;
447 tic->t_cnt = 0; /* ungrant will give back unit_res * t_cnt. */
468 struct xlog_ticket *tic;
478 tic = xlog_ticket_alloc(log, unit_bytes, cnt, permanent);
479 *ticp = tic;
481 xlog_grant_push_ail(log, tic->t_cnt ? tic->t_unit_res * tic->t_cnt
482 : tic->t_unit_res);
484 trace_xfs_log_reserve(log, tic);
486 error = xlog_grant_head_check(log, &log->l_reserve_head, tic,
493 trace_xfs_log_reserve_exit(log, tic);
503 tic->t_curr_res = 0;
504 tic->t_cnt = 0; /* ungrant will give back unit_res * t_cnt. */
957 struct xlog_ticket *tic = NULL;
960 error = xfs_log_reserve(mp, 600, 1, &tic, 0);
964 error = xlog_write_unmount_record(log, tic);
978 if (tic) {
979 trace_xfs_log_umount_write(log, tic);
980 xfs_log_ticket_ungrant(log, tic);
3516 struct xlog_ticket *tic;
3519 tic = kmem_cache_zalloc(xfs_log_ticket_cache, GFP_NOFS | __GFP_NOFAIL);
3521 unit_res = xlog_calc_unit_res(log, unit_bytes, &tic->t_iclog_hdrs);
3523 atomic_set(&tic->t_ref, 1);
3524 tic->t_task = current;
3525 INIT_LIST_HEAD(&tic->t_queue);
3526 tic->t_unit_res = unit_res;
3527 tic->t_curr_res = unit_res;
3528 tic->t_cnt = cnt;
3529 tic->t_ocnt = cnt;
3530 tic->t_tid = get_random_u32();
3532 tic->t_flags |= XLOG_TIC_PERM_RESERV;
3534 return tic;