Lines Matching refs:head_blk
510 xfs_daddr_t new_blk, first_blk, start_blk, last_blk, head_blk;
548 last_blk = head_blk = log_bbnum - 1; /* get cycle # of last block */
559 * case, head_blk can't be set to zero (which makes sense). The below
560 * math doesn't work out properly with head_blk equal to zero. Instead,
562 * value makes the math correct. If head_blk doesn't changed through
563 * all the tests below, *head_blk is set to zero at the very end rather
593 head_blk = log_bbnum;
619 error = xlog_find_cycle_start(log, buffer, first_blk, &head_blk,
633 if (head_blk >= num_scan_bblks) {
638 start_blk = head_blk - num_scan_bblks;
644 head_blk = new_blk;
673 ASSERT(head_blk <= INT_MAX &&
674 (xfs_daddr_t) num_scan_bblks >= head_blk);
675 start_blk = log_bbnum - (num_scan_bblks - head_blk);
677 num_scan_bblks - (int)head_blk,
681 head_blk = new_blk;
691 ASSERT(head_blk <= INT_MAX);
693 start_blk, (int)head_blk,
697 head_blk = new_blk;
702 * Now we need to make sure head_blk is not pointing to a block in
706 if (head_blk >= num_scan_bblks) {
707 start_blk = head_blk - num_scan_bblks; /* don't read head_blk */
709 /* start ptr at last block ptr before head_blk */
710 error = xlog_find_verify_log_record(log, start_blk, &head_blk, 0);
717 ASSERT(head_blk <= INT_MAX);
718 error = xlog_find_verify_log_record(log, start_blk, &head_blk, 0);
723 start_blk = log_bbnum - (num_scan_bblks - head_blk);
727 ASSERT(head_blk <= INT_MAX);
729 &new_blk, (int)head_blk);
735 head_blk = new_blk;
741 if (head_blk == log_bbnum)
744 *return_head_blk = head_blk;
771 xfs_daddr_t head_blk,
791 end_blk = head_blk > tail_blk ? tail_blk : 0;
792 for (i = (int) head_blk - 1; i >= end_blk; i--) {
810 if (tail_blk >= head_blk && found != count) {
845 xfs_daddr_t head_blk,
865 end_blk = head_blk > tail_blk ? head_blk : log->l_logBBsize - 1;
883 if (tail_blk > head_blk && found != count) {
884 for (i = 0; i < (int) head_blk; i++) {
912 xfs_daddr_t head_blk,
915 if (head_blk < tail_blk)
916 return tail_blk - head_blk;
918 return tail_blk + (log->l_logBBsize - head_blk);
943 xfs_daddr_t head_blk,
963 error = xlog_seek_logrec_hdr(log, head_blk, *tail_blk, 1, buffer,
978 error = xlog_do_recovery_pass(log, head_blk, *tail_blk,
987 tail_distance = xlog_tail_distance(log, head_blk, first_bad);
992 error = xlog_seek_logrec_hdr(log, head_blk, first_bad, 2,
999 error = xlog_do_recovery_pass(log, head_blk, *tail_blk,
1028 xfs_daddr_t *head_blk, /* in/out: unverified head */
1052 error = xlog_rseek_logrec_hdr(log, *head_blk, *tail_blk,
1064 error = xlog_do_recovery_pass(log, *head_blk, tmp_rhead_blk,
1074 first_bad, *head_blk);
1100 *head_blk = first_bad;
1102 if (*head_blk == *tail_blk) {
1110 return xlog_verify_tail(log, *head_blk, tail_blk,
1141 xfs_daddr_t *head_blk,
1160 * log, we convert to a log block before comparing to the head_blk.
1170 if (*head_blk == after_umount_blk &&
1200 xfs_daddr_t head_blk,
1207 * crashed. In the case where head_blk == 0, we bump curr_cycle
1216 log->l_curr_block = (int)head_blk;
1241 * We could speed up search by using current head_blk buffer, but it is not
1247 xfs_daddr_t *head_blk,
1262 if ((error = xlog_find_head(log, head_blk)))
1264 ASSERT(*head_blk < INT_MAX);
1269 if (*head_blk == 0) { /* special case */
1286 error = xlog_rseek_logrec_hdr(log, *head_blk, *head_blk, 1, buffer,
1300 xlog_set_state(log, *head_blk, rhead, rhead_blk, wrapped);
1307 error = xlog_check_unmount_rec(log, head_blk, tail_blk, rhead,
1323 xfs_daddr_t orig_head = *head_blk;
1325 error = xlog_verify_head(log, head_blk, tail_blk, buffer,
1331 if (*head_blk != orig_head) {
1332 xlog_set_state(log, *head_blk, rhead, rhead_blk,
1335 error = xlog_check_unmount_rec(log, head_blk, tail_blk,
2930 xfs_daddr_t head_blk,
2948 ASSERT(head_blk != tail_blk);
3028 if (tail_blk > head_blk) {
3157 while (blk_no < head_blk) {
3230 xfs_daddr_t head_blk,
3235 ASSERT(head_blk != tail_blk);
3247 error = xlog_do_recovery_pass(log, head_blk, tail_blk,
3258 error = xlog_do_recovery_pass(log, head_blk, tail_blk,
3281 xfs_daddr_t head_blk,
3289 trace_xfs_log_recover(log, head_blk, tail_blk);
3294 error = xlog_do_log_recovery(log, head_blk, tail_blk);
3360 xfs_daddr_t head_blk, tail_blk;
3364 error = xlog_find_tail(log, &head_blk, &tail_blk);
3377 if (tail_blk != head_blk) {
3430 error = xlog_do_recover(log, head_blk, tail_blk);