• Home
  • Raw
  • Download

Lines Matching refs:head

36 	atomic64_t		*head);
97 atomic64_t *head, in xlog_grant_sub_space() argument
100 int64_t head_val = atomic64_read(head); in xlog_grant_sub_space()
116 head_val = atomic64_cmpxchg(head, old, new); in xlog_grant_sub_space()
123 atomic64_t *head, in xlog_grant_add_space() argument
126 int64_t head_val = atomic64_read(head); in xlog_grant_add_space()
145 head_val = atomic64_cmpxchg(head, old, new); in xlog_grant_add_space()
151 struct xlog_grant_head *head) in xlog_grant_head_init() argument
153 xlog_assign_grant_head(&head->grant, 1, 0); in xlog_grant_head_init()
154 INIT_LIST_HEAD(&head->waiters); in xlog_grant_head_init()
155 spin_lock_init(&head->lock); in xlog_grant_head_init()
160 struct xlog_grant_head *head) in xlog_grant_head_wake_all() argument
164 spin_lock(&head->lock); in xlog_grant_head_wake_all()
165 list_for_each_entry(tic, &head->waiters, t_queue) in xlog_grant_head_wake_all()
167 spin_unlock(&head->lock); in xlog_grant_head_wake_all()
173 struct xlog_grant_head *head, in xlog_ticket_reservation() argument
176 if (head == &log->l_write_head) { in xlog_ticket_reservation()
190 struct xlog_grant_head *head, in xlog_grant_head_wake() argument
197 list_for_each_entry(tic, &head->waiters, t_queue) { in xlog_grant_head_wake()
220 need_bytes = xlog_ticket_reservation(log, head, tic); in xlog_grant_head_wake()
239 struct xlog_grant_head *head, in xlog_grant_head_wait() argument
241 int need_bytes) __releases(&head->lock) in xlog_grant_head_wait()
242 __acquires(&head->lock) in xlog_grant_head_wait()
244 list_add_tail(&tic->t_queue, &head->waiters); in xlog_grant_head_wait()
252 spin_unlock(&head->lock); in xlog_grant_head_wait()
260 spin_lock(&head->lock); in xlog_grant_head_wait()
263 } while (xlog_space_left(log, &head->grant) < need_bytes); in xlog_grant_head_wait()
292 struct xlog_grant_head *head, in xlog_grant_head_check() argument
307 *need_bytes = xlog_ticket_reservation(log, head, tic); in xlog_grant_head_check()
308 free_bytes = xlog_space_left(log, &head->grant); in xlog_grant_head_check()
309 if (!list_empty_careful(&head->waiters)) { in xlog_grant_head_check()
310 spin_lock(&head->lock); in xlog_grant_head_check()
311 if (!xlog_grant_head_wake(log, head, &free_bytes) || in xlog_grant_head_check()
313 error = xlog_grant_head_wait(log, head, tic, in xlog_grant_head_check()
316 spin_unlock(&head->lock); in xlog_grant_head_check()
318 spin_lock(&head->lock); in xlog_grant_head_check()
319 error = xlog_grant_head_wait(log, head, tic, *need_bytes); in xlog_grant_head_check()
320 spin_unlock(&head->lock); in xlog_grant_head_check()
1152 atomic64_t *head) in xlog_space_left() argument
1160 xlog_crack_grant_head(head, &head_cycle, &head_bytes); in xlog_space_left()
1313 xlog_rec_header_t *head; in xlog_alloc_log() local
1405 head = &iclog->ic_header; in xlog_alloc_log()
1406 memset(head, 0, sizeof(xlog_rec_header_t)); in xlog_alloc_log()
1407 head->h_magicno = cpu_to_be32(XLOG_HEADER_MAGIC_NUM); in xlog_alloc_log()
1408 head->h_version = cpu_to_be32( in xlog_alloc_log()
1410 head->h_size = cpu_to_be32(log->l_iclog_size); in xlog_alloc_log()
1412 head->h_fmt = cpu_to_be32(XLOG_FMT); in xlog_alloc_log()
1413 memcpy(&head->h_fs_uuid, &mp->m_sb.sb_uuid, sizeof(uuid_t)); in xlog_alloc_log()
2886 xlog_rec_header_t *head; in xlog_state_get_iclog_space() local
2905 head = &iclog->ic_header; in xlog_state_get_iclog_space()
2920 head->h_cycle = cpu_to_be32(log->l_curr_cycle); in xlog_state_get_iclog_space()
2921 head->h_lsn = cpu_to_be64( in xlog_state_get_iclog_space()