Lines Matching refs:head
194 xlog_rec_header_t *head)
199 &head->h_fs_uuid, be32_to_cpu(head->h_fmt));
202 #define xlog_header_check_dump(mp, head)
211 xlog_rec_header_t *head)
213 ASSERT(head->h_magicno == cpu_to_be32(XLOG_HEADER_MAGIC_NUM));
220 if (XFS_IS_CORRUPT(mp, head->h_fmt != cpu_to_be32(XLOG_FMT))) {
223 xlog_header_check_dump(mp, head);
227 &head->h_fs_uuid))) {
230 xlog_header_check_dump(mp, head);
237 * read the head block of the log and check the header
242 xlog_rec_header_t *head)
244 ASSERT(head->h_magicno == cpu_to_be32(XLOG_HEADER_MAGIC_NUM));
246 if (uuid_is_null(&head->h_fs_uuid)) {
254 &head->h_fs_uuid))) {
256 xlog_header_check_dump(mp, head);
403 xlog_rec_header_t *head = NULL;
440 head = (xlog_rec_header_t *)offset;
442 if (head->h_magicno == cpu_to_be32(XLOG_HEADER_MAGIC_NUM))
461 * of the log record _before_ the head. So we check the uuid.
463 if ((error = xlog_header_check_mount(log->l_mp, head)))
473 xhdrs = xlog_logrec_hblks(log, head);
476 BTOBB(be32_to_cpu(head->h_len)) + xhdrs)
487 * eliminated when calculating the head. We aren't guaranteed that previous
567 * then the start of that hole will be the new head. The
572 * In this case the head really is somewhere at the end of the
578 * the head has to end up at the start of the x-1 hole at the
584 * because we know that they cannot be the head since the log
596 * be where the new head belongs. First we do a binary search
664 * certainly not the head of the log. By searching for
750 xfs_warn(log->l_mp, "failed to find log head");
782 * Walk backwards from the head block until we hit the tail or the first
802 * callers can pass head == tail if the tail is not yet known.
830 * Given head and tail blocks, walk forward from the tail block until we find
831 * the provided number of records or hit the head block. The return value is the
856 * Walk forward from the tail block until we hit the head or the last
874 * If we haven't hit the head block or the log record header count,
901 * Calculate distance from head to tail (i.e., unused space in the log).
917 * writes have been detected near the front of the log and the head has been
920 * We also have to handle the case where the tail was pinned and the head
929 * Therefore, CRC check the log from tail to head. If a failure occurs and the
930 * offending record is within max iclog bufs from the head, walk the tail
965 * Run a CRC check from the tail to the head. We can't just check
967 * blocks cleared during the search for the head/tail. These blocks are
978 * Is corruption within range of the head? If so, retry from
1007 * Detect and trim torn writes from the head of the log.
1014 * one time. Therefore, CRC verify up to XLOG_MAX_ICLOGS records at the head of
1016 * policy. In the event of CRC failure, the head is walked back to the last good
1022 xfs_daddr_t *head_blk, /* in/out: unverified head */
1038 * Check the head of the log for torn writes. Search backwards from the
1039 * head until we hit the tail or the maximum number of log record I/Os
1055 * block found above to the current head. If a CRC failure occurs, the
1067 "Torn write (CRC failure) detected at log block 0x%llx. Truncating head block from 0x%llx.",
1074 * Note that xlog_find_tail() clears the blocks at the new head
1086 * Reset the head block to the starting block of the first bad
1090 * Bail out if the updated head/tail match as this indicates
1128 * Check whether the head of the log points to an unmount record. In other
1277 * block. This wraps all the way back around to the head so something is
1292 * Set the log state based on the current head record.
1298 * Look for an unmount record at the head of the log. This sets the log
1307 * Verify the log head if the log is not clean (e.g., we have anything
1308 * but an unmount record at the head). This uses CRC verification to
1310 * considered torn writes and the log head is trimmed accordingly.
1324 /* update in-core state again if the head changed */
1346 * Make sure that there are no blocks in front of the head
1347 * with the same cycle number as the head. This can happen
1452 * our current estimate of the head. What we're trying to detect is
1592 * in front of the log head. We do this so that we won't become confused
1623 * Figure out the distance between the new head of the log
1625 * head that we may have written just before the crash, but
1630 * The tail is behind the head in the physical log,
1631 * so the distance from the head to the tail is the
1632 * distance from the head to the end of the log plus
1643 * The head is behind the tail in the physical log,
1644 * so the distance from the head to the tail is just
1645 * the tail block minus the head block.
1655 * If the head is right up against the tail, we can't clear
1668 * we don't waste all day writing from the head to the tail
1690 * I/Os. The first write should be from the head to the
1706 * same cycle as the head so that we get:
1849 * Hence, 4 lists, in order from head to tail:
1856 * ordering is preserved within the lists. Adding objects to the head of the
1857 * list means when we traverse from the head we walk them in last-to-first
2039 struct list_head *head)
2045 list_add_tail(&item->ri_list, head);
2939 * Read the log from tail to head and process the log records found.
2940 * Handle the two cases where the tail and head are in the same cycle
3042 * When the head is not on the same cycle number as the tail,