Lines Matching refs:BB_OFFSET

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()
503 if (BB_OFFSET(p[lo]) > s) in prev_badblocks()
505 if (BB_OFFSET(p[hi - 1]) <= s) in prev_badblocks()
511 sector_t a = BB_OFFSET(p[mid]); in prev_badblocks()
524 if (BB_OFFSET(p[lo]) <= s) in prev_badblocks()
541 if ((s < BB_OFFSET(p[behind])) && in can_merge_behind()
542 ((s + sectors) >= BB_OFFSET(p[behind])) && in can_merge_behind()
562 WARN_ON(s >= BB_OFFSET(p[behind])); in behind_merge()
563 WARN_ON((s + sectors) < BB_OFFSET(p[behind])); in behind_merge()
565 if (s < BB_OFFSET(p[behind])) { in behind_merge()
566 merged = BB_OFFSET(p[behind]) - s; in behind_merge()
611 merged > (BB_OFFSET(p[prev + 1]) - BB_END(p[prev]))) { in front_merge()
612 merged = BB_OFFSET(p[prev + 1]) - BB_END(p[prev]); in front_merge()
615 p[prev] = BB_MAKE(BB_OFFSET(p[prev]), in front_merge()
639 (BB_OFFSET(p[prev]) == bad->start) && in can_combine_front()
640 (BB_END(p[prev - 1]) == BB_OFFSET(p[prev])) && in can_combine_front()
658 p[prev - 1] = BB_MAKE(BB_OFFSET(p[prev - 1]), in front_combine()
676 if (bad->start >= BB_OFFSET(p[front]) && in overlap_front()
691 if (bad->start < BB_OFFSET(p[behind]) && in overlap_behind()
692 (bad->start + bad->len) > BB_OFFSET(p[behind])) in overlap_behind()
731 if (BB_OFFSET(p[prev]) == bad->start) in can_front_overwrite()
738 if (BB_OFFSET(p[prev]) == bad->start) in can_front_overwrite()
770 p[prev] = BB_MAKE(BB_OFFSET(p[prev]), BB_LEN(p[prev]), in front_overwrite()
774 if (BB_OFFSET(p[prev]) == bad->start) { in front_overwrite()
775 p[prev] = BB_MAKE(BB_OFFSET(p[prev]), in front_overwrite()
783 p[prev] = BB_MAKE(BB_OFFSET(p[prev]), in front_overwrite()
784 bad->start - BB_OFFSET(p[prev]), in front_overwrite()
797 p[prev] = BB_MAKE(BB_OFFSET(p[prev]), in front_overwrite()
798 bad->start - BB_OFFSET(p[prev]), in front_overwrite()
913 if (bad.len > (BB_OFFSET(p[0]) - bad.start)) in _badblocks_set()
914 bad.len = BB_OFFSET(p[0]) - bad.start; in _badblocks_set()
928 len = BB_OFFSET(p[0]) - s; in _badblocks_set()
1004 bad.len, BB_OFFSET(p[prev + 1]) - bad.start); in _badblocks_set()
1027 BB_END(p[prev]) == BB_OFFSET(p[prev + 1]) && in _badblocks_set()
1030 p[prev] = BB_MAKE(BB_OFFSET(p[prev]), in _badblocks_set()
1082 if (s == BB_OFFSET(p[prev])) { in front_clear()
1084 p[prev] = BB_MAKE(BB_OFFSET(p[prev]) + sectors, in front_clear()
1096 } else if (s > BB_OFFSET(p[prev])) { in front_clear()
1099 p[prev] = BB_MAKE(BB_OFFSET(p[prev]), in front_clear()
1100 s - BB_OFFSET(p[prev]), in front_clear()
1125 p[prev] = BB_MAKE(BB_OFFSET(p[prev]), in front_splitting_clear()
1126 s - BB_OFFSET(p[prev]), in front_splitting_clear()
1186 len = BB_OFFSET(p[0]) - s; in _badblocks_clear()
1207 if (badblocks_full(bb) && (BB_OFFSET(p[prev]) < bad.start) && in _badblocks_clear()
1214 if ((BB_OFFSET(p[prev]) < bad.start) && in _badblocks_clear()
1239 len = BB_OFFSET(p[prev + 1]) - bad.start; in _badblocks_clear()
1334 *first_bad = BB_OFFSET(p[prev]); in _badblocks_check()
1343 len = BB_OFFSET(p[prev + 1]) - bad.start; in _badblocks_check()
1476 sector_t start = BB_OFFSET(p[i]); in ack_all_badblocks()
1514 sector_t s = BB_OFFSET(p[i]); in badblocks_show()