Lines Matching defs:head
36 atomic64_t *head);
147 atomic64_t *head,
150 int64_t head_val = atomic64_read(head);
166 head_val = atomic64_cmpxchg(head, old, new);
173 atomic64_t *head,
176 int64_t head_val = atomic64_read(head);
195 head_val = atomic64_cmpxchg(head, old, new);
201 struct xlog_grant_head *head)
203 xlog_assign_grant_head(&head->grant, 1, 0);
204 INIT_LIST_HEAD(&head->waiters);
205 spin_lock_init(&head->lock);
210 struct xlog_grant_head *head)
214 spin_lock(&head->lock);
215 list_for_each_entry(tic, &head->waiters, t_queue)
217 spin_unlock(&head->lock);
223 struct xlog_grant_head *head,
226 if (head == &log->l_write_head) {
240 struct xlog_grant_head *head,
247 list_for_each_entry(tic, &head->waiters, t_queue) {
252 * limiting the target to the log head (l_last_sync_lsn) at the
253 * time. This may not reflect where the log head is now as the
256 * Hence when we are woken here, it may be that the head of the
260 * pushed to the target defined by the old log head location, we
265 * the grant head, we need to push the AIL again to ensure the
266 * target reflects both the current log tail and log head
270 need_bytes = xlog_ticket_reservation(log, head, tic);
289 struct xlog_grant_head *head,
291 int need_bytes) __releases(&head->lock)
292 __acquires(&head->lock)
294 list_add_tail(&tic->t_queue, &head->waiters);
302 spin_unlock(&head->lock);
310 spin_lock(&head->lock);
313 } while (xlog_space_left(log, &head->grant) < need_bytes);
325 * Once a ticket gets put onto head->waiters, it will only return after the
333 * As tickets are only ever moved on and off head->waiters under head->lock, we
336 * head->waiters because the t_queue list head will be empty and we hold the
342 struct xlog_grant_head *head,
357 *need_bytes = xlog_ticket_reservation(log, head, tic);
358 free_bytes = xlog_space_left(log, &head->grant);
359 if (!list_empty_careful(&head->waiters)) {
360 spin_lock(&head->lock);
361 if (!xlog_grant_head_wake(log, head, &free_bytes) ||
363 error = xlog_grant_head_wait(log, head, tic,
366 spin_unlock(&head->lock);
368 spin_lock(&head->lock);
369 error = xlog_grant_head_wait(log, head, tic, *need_bytes);
370 spin_unlock(&head->lock);
398 * Replenish the byte reservation required by moving the grant write head.
948 * Mark the filesystem clean by writing an unmount record to the head of the
1317 * Return the space in the log between the tail and the head. The head
1319 * the reserve head has wrapped passed the tail, this calculation is no
1322 * with the reserve head. Of course, if the write head were to ever
1326 * If reservation head is behind the tail, we have a problem. Warn about it,
1329 * If the log is shut down, the head and tail may be invalid or out of whack, so
1336 atomic64_t *head)
1343 xlog_crack_grant_head(head, &head_cycle, &head_bytes);
1361 * The reservation head is behind the tail. In this case we just want to
1364 xfs_alert(log->l_mp, "xlog_space_left: head behind tail");
1524 xlog_rec_header_t *head;
1619 head = &iclog->ic_header;
1620 memset(head, 0, sizeof(xlog_rec_header_t));
1621 head->h_magicno = cpu_to_be32(XLOG_HEADER_MAGIC_NUM);
1622 head->h_version = cpu_to_be32(
1624 head->h_size = cpu_to_be32(log->l_iclog_size);
1626 head->h_fmt = cpu_to_be32(XLOG_FMT);
1627 memcpy(&head->h_fs_uuid, &mp->m_sb.sb_uuid, sizeof(uuid_t));
2694 * the reservation grant head pushing. This is due to the fact that the push
2699 * should push the AIL to ensure the push target (and hence the grant head) is
2700 * no longer bound by the old log head location and can move forwards and make
2877 * If the head of the in-core log ring is not (ACTIVE or DIRTY), then we must
2878 * sleep. We wait on the flush queue on the head iclog as that should be
2883 * out-of-order even when an iclog past the head is free.
2903 xlog_rec_header_t *head;
2922 head = &iclog->ic_header;
2936 head->h_cycle = cpu_to_be32(log->l_curr_cycle);
2937 head->h_lsn = cpu_to_be64(
2992 * grant write head because the permanent reservation has reserved cnt times the
2994 * current reservation to be one units worth. Also move grant reservation head
3203 * If the head is dirty or (active and empty), then we need to
3539 * Check to make sure the grant write head didn't just over lap the tail. If
3740 * current head/tail for future recovery attempts. Hence we need to