Lines Matching full:hint

328  * the binary search inside prev_badblocks(), it is possible to provide a hint
330 * avoided. In my test with the hint to prev_badblocks(), except for the first
454 * starts from index 'hint' and stops at index 'hint_end' from the bad
457 static int prev_by_hint(struct badblocks *bb, sector_t s, int hint) in prev_by_hint() argument
459 int hint_end = hint + 2; in prev_by_hint()
463 while ((hint < hint_end) && ((hint + 1) <= bb->count) && in prev_by_hint()
464 (BB_OFFSET(p[hint]) <= s)) { in prev_by_hint()
465 if ((hint + 1) == bb->count || BB_OFFSET(p[hint + 1]) > s) { in prev_by_hint()
466 ret = hint; in prev_by_hint()
469 hint++; in prev_by_hint()
476 * Find the range starts at-or-before bad->start. If 'hint' is provided
477 * (hint >= 0) then search in the bad table from hint firstly. It is
478 * very probably the wanted bad range can be found from the hint index,
482 int hint) in prev_badblocks() argument
492 if (hint >= 0) { in prev_badblocks()
493 ret = prev_by_hint(bb, s, hint); in prev_badblocks()
844 int prev = -1, hint = -1; in _badblocks_set() local
885 prev = prev_badblocks(bb, &bad, hint); in _badblocks_set()
895 hint = ++prev; in _badblocks_set()
904 hint = prev; in _badblocks_set()
921 hint = prev; in _badblocks_set()
934 hint = prev; in _badblocks_set()
941 hint = prev; in _badblocks_set()
954 hint = ++prev; in _badblocks_set()
1056 int prev = -1, hint = -1; in _badblocks_clear() local
1099 prev = prev_badblocks(bb, &bad, hint); in _badblocks_clear()
1105 hint = 0; in _badblocks_clear()
1149 hint = prev; in _badblocks_clear()
1158 hint = prev + 1; in _badblocks_clear()
1193 int prev = -1, hint = -1, set = 0; in _badblocks_check() local
1209 prev = prev_badblocks(bb, &bad, hint); in _badblocks_check()
1241 hint = prev + 1; in _badblocks_check()