Lines Matching refs:head_blk

504 	xfs_daddr_t	new_blk, first_blk, start_blk, last_blk, head_blk;  in xlog_find_head()  local
542 last_blk = head_blk = log_bbnum - 1; /* get cycle # of last block */ in xlog_find_head()
587 head_blk = log_bbnum; in xlog_find_head()
613 error = xlog_find_cycle_start(log, buffer, first_blk, &head_blk, in xlog_find_head()
627 if (head_blk >= num_scan_bblks) { in xlog_find_head()
632 start_blk = head_blk - num_scan_bblks; in xlog_find_head()
638 head_blk = new_blk; in xlog_find_head()
667 ASSERT(head_blk <= INT_MAX && in xlog_find_head()
668 (xfs_daddr_t) num_scan_bblks >= head_blk); in xlog_find_head()
669 start_blk = log_bbnum - (num_scan_bblks - head_blk); in xlog_find_head()
671 num_scan_bblks - (int)head_blk, in xlog_find_head()
675 head_blk = new_blk; in xlog_find_head()
685 ASSERT(head_blk <= INT_MAX); in xlog_find_head()
687 start_blk, (int)head_blk, in xlog_find_head()
691 head_blk = new_blk; in xlog_find_head()
700 if (head_blk >= num_scan_bblks) { in xlog_find_head()
701 start_blk = head_blk - num_scan_bblks; /* don't read head_blk */ in xlog_find_head()
704 error = xlog_find_verify_log_record(log, start_blk, &head_blk, 0); in xlog_find_head()
711 ASSERT(head_blk <= INT_MAX); in xlog_find_head()
712 error = xlog_find_verify_log_record(log, start_blk, &head_blk, 0); in xlog_find_head()
717 start_blk = log_bbnum - (num_scan_bblks - head_blk); in xlog_find_head()
721 ASSERT(head_blk <= INT_MAX); in xlog_find_head()
723 &new_blk, (int)head_blk); in xlog_find_head()
729 head_blk = new_blk; in xlog_find_head()
735 if (head_blk == log_bbnum) in xlog_find_head()
738 *return_head_blk = head_blk; in xlog_find_head()
765 xfs_daddr_t head_blk, in xlog_rseek_logrec_hdr() argument
785 end_blk = head_blk > tail_blk ? tail_blk : 0; in xlog_rseek_logrec_hdr()
786 for (i = (int) head_blk - 1; i >= end_blk; i--) { in xlog_rseek_logrec_hdr()
804 if (tail_blk >= head_blk && found != count) { in xlog_rseek_logrec_hdr()
839 xfs_daddr_t head_blk, in xlog_seek_logrec_hdr() argument
859 end_blk = head_blk > tail_blk ? head_blk : log->l_logBBsize - 1; in xlog_seek_logrec_hdr()
877 if (tail_blk > head_blk && found != count) { in xlog_seek_logrec_hdr()
878 for (i = 0; i < (int) head_blk; i++) { in xlog_seek_logrec_hdr()
906 xfs_daddr_t head_blk, in xlog_tail_distance() argument
909 if (head_blk < tail_blk) in xlog_tail_distance()
910 return tail_blk - head_blk; in xlog_tail_distance()
912 return tail_blk + (log->l_logBBsize - head_blk); in xlog_tail_distance()
937 xfs_daddr_t head_blk, in xlog_verify_tail() argument
957 error = xlog_seek_logrec_hdr(log, head_blk, *tail_blk, 1, buffer, in xlog_verify_tail()
972 error = xlog_do_recovery_pass(log, head_blk, *tail_blk, in xlog_verify_tail()
981 tail_distance = xlog_tail_distance(log, head_blk, first_bad); in xlog_verify_tail()
986 error = xlog_seek_logrec_hdr(log, head_blk, first_bad, 2, in xlog_verify_tail()
993 error = xlog_do_recovery_pass(log, head_blk, *tail_blk, in xlog_verify_tail()
1022 xfs_daddr_t *head_blk, /* in/out: unverified head */ in xlog_verify_head() argument
1046 error = xlog_rseek_logrec_hdr(log, *head_blk, *tail_blk, in xlog_verify_head()
1058 error = xlog_do_recovery_pass(log, *head_blk, tmp_rhead_blk, in xlog_verify_head()
1068 first_bad, *head_blk); in xlog_verify_head()
1094 *head_blk = first_bad; in xlog_verify_head()
1096 if (*head_blk == *tail_blk) { in xlog_verify_head()
1104 return xlog_verify_tail(log, *head_blk, tail_blk, in xlog_verify_head()
1135 xfs_daddr_t *head_blk, in xlog_check_unmount_rec() argument
1164 if (*head_blk == after_umount_blk && in xlog_check_unmount_rec()
1194 xfs_daddr_t head_blk, in xlog_set_state() argument
1210 log->l_curr_block = (int)head_blk; in xlog_set_state()
1237 xfs_daddr_t *head_blk, in xlog_find_tail() argument
1252 if ((error = xlog_find_head(log, head_blk))) in xlog_find_tail()
1254 ASSERT(*head_blk < INT_MAX); in xlog_find_tail()
1259 if (*head_blk == 0) { /* special case */ in xlog_find_tail()
1276 error = xlog_rseek_logrec_hdr(log, *head_blk, *head_blk, 1, buffer, in xlog_find_tail()
1290 xlog_set_state(log, *head_blk, rhead, rhead_blk, wrapped); in xlog_find_tail()
1297 error = xlog_check_unmount_rec(log, head_blk, tail_blk, rhead, in xlog_find_tail()
1313 xfs_daddr_t orig_head = *head_blk; in xlog_find_tail()
1315 error = xlog_verify_head(log, head_blk, tail_blk, buffer, in xlog_find_tail()
1321 if (*head_blk != orig_head) { in xlog_find_tail()
1322 xlog_set_state(log, *head_blk, rhead, rhead_blk, in xlog_find_tail()
1325 error = xlog_check_unmount_rec(log, head_blk, tail_blk, in xlog_find_tail()
2988 xfs_daddr_t head_blk, in xlog_do_recovery_pass() argument
3006 ASSERT(head_blk != tail_blk); in xlog_do_recovery_pass()
3085 if (tail_blk > head_blk) { in xlog_do_recovery_pass()
3214 while (blk_no < head_blk) { in xlog_do_recovery_pass()
3304 xfs_daddr_t head_blk, in xlog_do_log_recovery() argument
3309 ASSERT(head_blk != tail_blk); in xlog_do_log_recovery()
3319 error = xlog_do_recovery_pass(log, head_blk, tail_blk, in xlog_do_log_recovery()
3328 error = xlog_do_recovery_pass(log, head_blk, tail_blk, in xlog_do_log_recovery()
3343 xfs_daddr_t head_blk, in xlog_do_recover() argument
3351 trace_xfs_log_recover(log, head_blk, tail_blk); in xlog_do_recover()
3356 error = xlog_do_log_recovery(log, head_blk, tail_blk); in xlog_do_recover()
3411 xfs_daddr_t head_blk, tail_blk; in xlog_recover() local
3415 error = xlog_find_tail(log, &head_blk, &tail_blk); in xlog_recover()
3428 if (tail_blk != head_blk) { in xlog_recover()
3481 error = xlog_do_recover(log, head_blk, tail_blk); in xlog_recover()