• Home
  • Raw
  • Download

Lines Matching refs:head

36 	atomic64_t		*head);
147 atomic64_t *head, in xlog_grant_sub_space() argument
150 int64_t head_val = atomic64_read(head); in xlog_grant_sub_space()
166 head_val = atomic64_cmpxchg(head, old, new); in xlog_grant_sub_space()
173 atomic64_t *head, in xlog_grant_add_space() argument
176 int64_t head_val = atomic64_read(head); in xlog_grant_add_space()
195 head_val = atomic64_cmpxchg(head, old, new); in xlog_grant_add_space()
201 struct xlog_grant_head *head) in xlog_grant_head_init() argument
203 xlog_assign_grant_head(&head->grant, 1, 0); in xlog_grant_head_init()
204 INIT_LIST_HEAD(&head->waiters); in xlog_grant_head_init()
205 spin_lock_init(&head->lock); in xlog_grant_head_init()
210 struct xlog_grant_head *head) in xlog_grant_head_wake_all() argument
214 spin_lock(&head->lock); in xlog_grant_head_wake_all()
215 list_for_each_entry(tic, &head->waiters, t_queue) in xlog_grant_head_wake_all()
217 spin_unlock(&head->lock); in xlog_grant_head_wake_all()
223 struct xlog_grant_head *head, in xlog_ticket_reservation() argument
226 if (head == &log->l_write_head) { in xlog_ticket_reservation()
240 struct xlog_grant_head *head, in xlog_grant_head_wake() argument
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()
289 struct xlog_grant_head *head, in xlog_grant_head_wait() argument
291 int need_bytes) __releases(&head->lock) in xlog_grant_head_wait()
292 __acquires(&head->lock) in xlog_grant_head_wait()
294 list_add_tail(&tic->t_queue, &head->waiters); in xlog_grant_head_wait()
302 spin_unlock(&head->lock); in xlog_grant_head_wait()
310 spin_lock(&head->lock); in xlog_grant_head_wait()
313 } while (xlog_space_left(log, &head->grant) < need_bytes); in xlog_grant_head_wait()
342 struct xlog_grant_head *head, in xlog_grant_head_check() argument
357 *need_bytes = xlog_ticket_reservation(log, head, tic); in xlog_grant_head_check()
358 free_bytes = xlog_space_left(log, &head->grant); in xlog_grant_head_check()
359 if (!list_empty_careful(&head->waiters)) { in xlog_grant_head_check()
360 spin_lock(&head->lock); in xlog_grant_head_check()
361 if (!xlog_grant_head_wake(log, head, &free_bytes) || in xlog_grant_head_check()
363 error = xlog_grant_head_wait(log, head, tic, in xlog_grant_head_check()
366 spin_unlock(&head->lock); in xlog_grant_head_check()
368 spin_lock(&head->lock); in xlog_grant_head_check()
369 error = xlog_grant_head_wait(log, head, tic, *need_bytes); in xlog_grant_head_check()
370 spin_unlock(&head->lock); in xlog_grant_head_check()
1343 atomic64_t *head) in xlog_space_left() argument
1350 xlog_crack_grant_head(head, &head_cycle, &head_bytes); in xlog_space_left()
1531 xlog_rec_header_t *head; in xlog_alloc_log() local
1626 head = &iclog->ic_header; in xlog_alloc_log()
1627 memset(head, 0, sizeof(xlog_rec_header_t)); in xlog_alloc_log()
1628 head->h_magicno = cpu_to_be32(XLOG_HEADER_MAGIC_NUM); in xlog_alloc_log()
1629 head->h_version = cpu_to_be32( in xlog_alloc_log()
1631 head->h_size = cpu_to_be32(log->l_iclog_size); in xlog_alloc_log()
1633 head->h_fmt = cpu_to_be32(XLOG_FMT); in xlog_alloc_log()
1634 memcpy(&head->h_fs_uuid, &mp->m_sb.sb_uuid, sizeof(uuid_t)); in xlog_alloc_log()
2920 xlog_rec_header_t *head; in xlog_state_get_iclog_space() local
2939 head = &iclog->ic_header; in xlog_state_get_iclog_space()
2953 head->h_cycle = cpu_to_be32(log->l_curr_cycle); in xlog_state_get_iclog_space()
2954 head->h_lsn = cpu_to_be64( in xlog_state_get_iclog_space()