Lines Matching refs:tic

212 	struct xlog_ticket	*tic;  in xlog_grant_head_wake_all()  local
215 list_for_each_entry(tic, &head->waiters, t_queue) in xlog_grant_head_wake_all()
216 wake_up_process(tic->t_task); in xlog_grant_head_wake_all()
224 struct xlog_ticket *tic) in xlog_ticket_reservation() argument
227 ASSERT(tic->t_flags & XLOG_TIC_PERM_RESERV); in xlog_ticket_reservation()
228 return tic->t_unit_res; in xlog_ticket_reservation()
231 if (tic->t_flags & XLOG_TIC_PERM_RESERV) in xlog_ticket_reservation()
232 return tic->t_unit_res * tic->t_cnt; in xlog_ticket_reservation()
234 return tic->t_unit_res; in xlog_ticket_reservation()
243 struct xlog_ticket *tic; in xlog_grant_head_wake() local
247 list_for_each_entry(tic, &head->waiters, t_queue) { in xlog_grant_head_wake()
270 need_bytes = xlog_ticket_reservation(log, head, tic); in xlog_grant_head_wake()
278 trace_xfs_log_grant_wake_up(log, tic); in xlog_grant_head_wake()
279 wake_up_process(tic->t_task); in xlog_grant_head_wake()
290 struct xlog_ticket *tic, in xlog_grant_head_wait() argument
294 list_add_tail(&tic->t_queue, &head->waiters); in xlog_grant_head_wait()
306 trace_xfs_log_grant_sleep(log, tic); in xlog_grant_head_wait()
308 trace_xfs_log_grant_wake(log, tic); in xlog_grant_head_wait()
315 list_del_init(&tic->t_queue); in xlog_grant_head_wait()
318 list_del_init(&tic->t_queue); in xlog_grant_head_wait()
343 struct xlog_ticket *tic, in xlog_grant_head_check() argument
357 *need_bytes = xlog_ticket_reservation(log, head, tic); in xlog_grant_head_check()
363 error = xlog_grant_head_wait(log, head, tic, in xlog_grant_head_check()
369 error = xlog_grant_head_wait(log, head, tic, *need_bytes); in xlog_grant_head_check()
403 struct xlog_ticket *tic) in xfs_log_regrant() argument
420 tic->t_tid++; in xfs_log_regrant()
422 xlog_grant_push_ail(log, tic->t_unit_res); in xfs_log_regrant()
424 tic->t_curr_res = tic->t_unit_res; in xfs_log_regrant()
425 if (tic->t_cnt > 0) in xfs_log_regrant()
428 trace_xfs_log_regrant(log, tic); in xfs_log_regrant()
430 error = xlog_grant_head_check(log, &log->l_write_head, tic, in xfs_log_regrant()
436 trace_xfs_log_regrant_exit(log, tic); in xfs_log_regrant()
446 tic->t_curr_res = 0; in xfs_log_regrant()
447 tic->t_cnt = 0; /* ungrant will give back unit_res * t_cnt. */ in xfs_log_regrant()
468 struct xlog_ticket *tic; in xfs_log_reserve() local
478 tic = xlog_ticket_alloc(log, unit_bytes, cnt, permanent); in xfs_log_reserve()
479 *ticp = tic; in xfs_log_reserve()
481 xlog_grant_push_ail(log, tic->t_cnt ? tic->t_unit_res * tic->t_cnt in xfs_log_reserve()
482 : tic->t_unit_res); in xfs_log_reserve()
484 trace_xfs_log_reserve(log, tic); in xfs_log_reserve()
486 error = xlog_grant_head_check(log, &log->l_reserve_head, tic, in xfs_log_reserve()
493 trace_xfs_log_reserve_exit(log, tic); in xfs_log_reserve()
503 tic->t_curr_res = 0; in xfs_log_reserve()
504 tic->t_cnt = 0; /* ungrant will give back unit_res * t_cnt. */ in xfs_log_reserve()
991 struct xlog_ticket *tic = NULL; in xlog_unmount_write() local
994 error = xfs_log_reserve(mp, 600, 1, &tic, 0); in xlog_unmount_write()
998 error = xlog_write_unmount_record(log, tic); in xlog_unmount_write()
1012 if (tic) { in xlog_unmount_write()
1013 trace_xfs_log_umount_write(log, tic); in xlog_unmount_write()
1014 xfs_log_ticket_ungrant(log, tic); in xlog_unmount_write()
3549 struct xlog_ticket *tic; in xlog_ticket_alloc() local
3552 tic = kmem_cache_zalloc(xfs_log_ticket_cache, GFP_NOFS | __GFP_NOFAIL); in xlog_ticket_alloc()
3554 unit_res = xlog_calc_unit_res(log, unit_bytes, &tic->t_iclog_hdrs); in xlog_ticket_alloc()
3556 atomic_set(&tic->t_ref, 1); in xlog_ticket_alloc()
3557 tic->t_task = current; in xlog_ticket_alloc()
3558 INIT_LIST_HEAD(&tic->t_queue); in xlog_ticket_alloc()
3559 tic->t_unit_res = unit_res; in xlog_ticket_alloc()
3560 tic->t_curr_res = unit_res; in xlog_ticket_alloc()
3561 tic->t_cnt = cnt; in xlog_ticket_alloc()
3562 tic->t_ocnt = cnt; in xlog_ticket_alloc()
3563 tic->t_tid = get_random_u32(); in xlog_ticket_alloc()
3565 tic->t_flags |= XLOG_TIC_PERM_RESERV; in xlog_ticket_alloc()
3567 return tic; in xlog_ticket_alloc()