Lines Matching refs:tic

211 	struct xlog_ticket	*tic;  in xlog_grant_head_wake_all()  local
214 list_for_each_entry(tic, &head->waiters, t_queue) in xlog_grant_head_wake_all()
215 wake_up_process(tic->t_task); in xlog_grant_head_wake_all()
223 struct xlog_ticket *tic) in xlog_ticket_reservation() argument
226 ASSERT(tic->t_flags & XLOG_TIC_PERM_RESERV); in xlog_ticket_reservation()
227 return tic->t_unit_res; in xlog_ticket_reservation()
229 if (tic->t_flags & XLOG_TIC_PERM_RESERV) in xlog_ticket_reservation()
230 return tic->t_unit_res * tic->t_cnt; in xlog_ticket_reservation()
232 return tic->t_unit_res; in xlog_ticket_reservation()
242 struct xlog_ticket *tic; in xlog_grant_head_wake() local
246 list_for_each_entry(tic, &head->waiters, t_queue) { in xlog_grant_head_wake()
269 need_bytes = xlog_ticket_reservation(log, head, tic); in xlog_grant_head_wake()
277 trace_xfs_log_grant_wake_up(log, tic); in xlog_grant_head_wake()
278 wake_up_process(tic->t_task); in xlog_grant_head_wake()
289 struct xlog_ticket *tic, in xlog_grant_head_wait() argument
293 list_add_tail(&tic->t_queue, &head->waiters); in xlog_grant_head_wait()
305 trace_xfs_log_grant_sleep(log, tic); in xlog_grant_head_wait()
307 trace_xfs_log_grant_wake(log, tic); in xlog_grant_head_wait()
314 list_del_init(&tic->t_queue); in xlog_grant_head_wait()
317 list_del_init(&tic->t_queue); in xlog_grant_head_wait()
342 struct xlog_ticket *tic, in xlog_grant_head_check() argument
356 *need_bytes = xlog_ticket_reservation(log, head, tic); in xlog_grant_head_check()
362 error = xlog_grant_head_wait(log, head, tic, in xlog_grant_head_check()
368 error = xlog_grant_head_wait(log, head, tic, *need_bytes); in xlog_grant_head_check()
402 struct xlog_ticket *tic) in xfs_log_regrant() argument
419 tic->t_tid++; in xfs_log_regrant()
421 xlog_grant_push_ail(log, tic->t_unit_res); in xfs_log_regrant()
423 tic->t_curr_res = tic->t_unit_res; in xfs_log_regrant()
424 if (tic->t_cnt > 0) in xfs_log_regrant()
427 trace_xfs_log_regrant(log, tic); in xfs_log_regrant()
429 error = xlog_grant_head_check(log, &log->l_write_head, tic, in xfs_log_regrant()
435 trace_xfs_log_regrant_exit(log, tic); in xfs_log_regrant()
445 tic->t_curr_res = 0; in xfs_log_regrant()
446 tic->t_cnt = 0; /* ungrant will give back unit_res * t_cnt. */ in xfs_log_regrant()
467 struct xlog_ticket *tic; in xfs_log_reserve() local
477 tic = xlog_ticket_alloc(log, unit_bytes, cnt, permanent); in xfs_log_reserve()
478 *ticp = tic; in xfs_log_reserve()
480 xlog_grant_push_ail(log, tic->t_cnt ? tic->t_unit_res * tic->t_cnt in xfs_log_reserve()
481 : tic->t_unit_res); in xfs_log_reserve()
483 trace_xfs_log_reserve(log, tic); in xfs_log_reserve()
485 error = xlog_grant_head_check(log, &log->l_reserve_head, tic, in xfs_log_reserve()
492 trace_xfs_log_reserve_exit(log, tic); in xfs_log_reserve()
502 tic->t_curr_res = 0; in xfs_log_reserve()
503 tic->t_cnt = 0; /* ungrant will give back unit_res * t_cnt. */ in xfs_log_reserve()
968 struct xlog_ticket *tic = NULL; in xlog_unmount_write() local
971 error = xfs_log_reserve(mp, 600, 1, &tic, 0); in xlog_unmount_write()
975 error = xlog_write_unmount_record(log, tic); in xlog_unmount_write()
989 if (tic) { in xlog_unmount_write()
990 trace_xfs_log_umount_write(log, tic); in xlog_unmount_write()
991 xfs_log_ticket_ungrant(log, tic); in xlog_unmount_write()
3510 struct xlog_ticket *tic; in xlog_ticket_alloc() local
3513 tic = kmem_cache_zalloc(xfs_log_ticket_cache, GFP_NOFS | __GFP_NOFAIL); in xlog_ticket_alloc()
3517 atomic_set(&tic->t_ref, 1); in xlog_ticket_alloc()
3518 tic->t_task = current; in xlog_ticket_alloc()
3519 INIT_LIST_HEAD(&tic->t_queue); in xlog_ticket_alloc()
3520 tic->t_unit_res = unit_res; in xlog_ticket_alloc()
3521 tic->t_curr_res = unit_res; in xlog_ticket_alloc()
3522 tic->t_cnt = cnt; in xlog_ticket_alloc()
3523 tic->t_ocnt = cnt; in xlog_ticket_alloc()
3524 tic->t_tid = prandom_u32(); in xlog_ticket_alloc()
3526 tic->t_flags |= XLOG_TIC_PERM_RESERV; in xlog_ticket_alloc()
3528 return tic; in xlog_ticket_alloc()