Lines Matching refs:head_blk

504 	xfs_daddr_t	new_blk, first_blk, start_blk, last_blk, head_blk;
542 last_blk = head_blk = log_bbnum - 1; /* get cycle # of last block */
553 * case, head_blk can't be set to zero (which makes sense). The below
554 * math doesn't work out properly with head_blk equal to zero. Instead,
556 * value makes the math correct. If head_blk doesn't changed through
557 * all the tests below, *head_blk is set to zero at the very end rather
587 head_blk = log_bbnum;
613 error = xlog_find_cycle_start(log, buffer, first_blk, &head_blk,
627 if (head_blk >= num_scan_bblks) {
632 start_blk = head_blk - num_scan_bblks;
638 head_blk = new_blk;
667 ASSERT(head_blk <= INT_MAX &&
668 (xfs_daddr_t) num_scan_bblks >= head_blk);
669 start_blk = log_bbnum - (num_scan_bblks - head_blk);
671 num_scan_bblks - (int)head_blk,
675 head_blk = new_blk;
685 ASSERT(head_blk <= INT_MAX);
687 start_blk, (int)head_blk,
691 head_blk = new_blk;
696 * Now we need to make sure head_blk is not pointing to a block in
700 if (head_blk >= num_scan_bblks) {
701 start_blk = head_blk - num_scan_bblks; /* don't read head_blk */
703 /* start ptr at last block ptr before head_blk */
704 error = xlog_find_verify_log_record(log, start_blk, &head_blk, 0);
711 ASSERT(head_blk <= INT_MAX);
712 error = xlog_find_verify_log_record(log, start_blk, &head_blk, 0);
717 start_blk = log_bbnum - (num_scan_bblks - head_blk);
721 ASSERT(head_blk <= INT_MAX);
723 &new_blk, (int)head_blk);
729 head_blk = new_blk;
735 if (head_blk == log_bbnum)
738 *return_head_blk = head_blk;
765 xfs_daddr_t head_blk,
785 end_blk = head_blk > tail_blk ? tail_blk : 0;
786 for (i = (int) head_blk - 1; i >= end_blk; i--) {
804 if (tail_blk >= head_blk && found != count) {
839 xfs_daddr_t head_blk,
859 end_blk = head_blk > tail_blk ? head_blk : log->l_logBBsize - 1;
877 if (tail_blk > head_blk && found != count) {
878 for (i = 0; i < (int) head_blk; i++) {
906 xfs_daddr_t head_blk,
909 if (head_blk < tail_blk)
910 return tail_blk - head_blk;
912 return tail_blk + (log->l_logBBsize - head_blk);
937 xfs_daddr_t head_blk,
957 error = xlog_seek_logrec_hdr(log, head_blk, *tail_blk, 1, buffer,
972 error = xlog_do_recovery_pass(log, head_blk, *tail_blk,
981 tail_distance = xlog_tail_distance(log, head_blk, first_bad);
986 error = xlog_seek_logrec_hdr(log, head_blk, first_bad, 2,
993 error = xlog_do_recovery_pass(log, head_blk, *tail_blk,
1022 xfs_daddr_t *head_blk, /* in/out: unverified head */
1046 error = xlog_rseek_logrec_hdr(log, *head_blk, *tail_blk,
1058 error = xlog_do_recovery_pass(log, *head_blk, tmp_rhead_blk,
1068 first_bad, *head_blk);
1094 *head_blk = first_bad;
1096 if (*head_blk == *tail_blk) {
1104 return xlog_verify_tail(log, *head_blk, tail_blk,
1135 xfs_daddr_t *head_blk,
1154 * log, we convert to a log block before comparing to the head_blk.
1164 if (*head_blk == after_umount_blk &&
1194 xfs_daddr_t head_blk,
1201 * crashed. In the case where head_blk == 0, we bump curr_cycle
1210 log->l_curr_block = (int)head_blk;
1235 * We could speed up search by using current head_blk buffer, but it is not
1241 xfs_daddr_t *head_blk,
1256 if ((error = xlog_find_head(log, head_blk)))
1258 ASSERT(*head_blk < INT_MAX);
1263 if (*head_blk == 0) { /* special case */
1280 error = xlog_rseek_logrec_hdr(log, *head_blk, *head_blk, 1, buffer,
1294 xlog_set_state(log, *head_blk, rhead, rhead_blk, wrapped);
1301 error = xlog_check_unmount_rec(log, head_blk, tail_blk, rhead,
1317 xfs_daddr_t orig_head = *head_blk;
1319 error = xlog_verify_head(log, head_blk, tail_blk, buffer,
1325 if (*head_blk != orig_head) {
1326 xlog_set_state(log, *head_blk, rhead, rhead_blk,
1329 error = xlog_check_unmount_rec(log, head_blk, tail_blk,
2949 xfs_daddr_t head_blk,
2967 ASSERT(head_blk != tail_blk);
3039 if (tail_blk > head_blk) {
3168 while (blk_no < head_blk) {
3241 xfs_daddr_t head_blk,
3246 ASSERT(head_blk != tail_blk);
3256 error = xlog_do_recovery_pass(log, head_blk, tail_blk,
3265 error = xlog_do_recovery_pass(log, head_blk, tail_blk,
3280 xfs_daddr_t head_blk,
3288 trace_xfs_log_recover(log, head_blk, tail_blk);
3293 error = xlog_do_log_recovery(log, head_blk, tail_blk);
3356 xfs_daddr_t head_blk, tail_blk;
3360 error = xlog_find_tail(log, &head_blk, &tail_blk);
3373 if (tail_blk != head_blk) {
3426 error = xlog_do_recover(log, head_blk, tail_blk);