Lines Matching refs:p

58 	u64 *p = bb->page;  in badblocks_check()  local
87 sector_t a = BB_OFFSET(p[mid]); in badblocks_check()
104 BB_OFFSET(p[lo]) + BB_LEN(p[lo]) > s) { in badblocks_check()
105 if (BB_OFFSET(p[lo]) < target) { in badblocks_check()
109 if (rv != -1 && BB_ACK(p[lo])) in badblocks_check()
113 *first_bad = BB_OFFSET(p[lo]); in badblocks_check()
114 *bad_sectors = BB_LEN(p[lo]); in badblocks_check()
129 u64 *p = bb->page; in badblocks_update_acked() local
137 if (!BB_ACK(p[i])) { in badblocks_update_acked()
165 u64 *p; in badblocks_set() local
186 p = bb->page; in badblocks_set()
192 sector_t a = BB_OFFSET(p[mid]); in badblocks_set()
199 if (hi > lo && BB_OFFSET(p[lo]) > s) in badblocks_set()
206 sector_t a = BB_OFFSET(p[lo]); in badblocks_set()
207 sector_t e = a + BB_LEN(p[lo]); in badblocks_set()
208 int ack = BB_ACK(p[lo]); in badblocks_set()
221 p[lo] = BB_MAKE(a, e-a, ack); in badblocks_set()
227 if (BB_LEN(p[lo]) != BB_MAX_LEN) in badblocks_set()
228 p[lo] = BB_MAKE(a, BB_MAX_LEN, ack); in badblocks_set()
238 sector_t a = BB_OFFSET(p[hi]); in badblocks_set()
239 sector_t e = a + BB_LEN(p[hi]); in badblocks_set()
240 int ack = BB_ACK(p[hi]); in badblocks_set()
253 p[hi] = BB_MAKE(a, e-a, ack); in badblocks_set()
256 p[hi] = BB_MAKE(a, BB_MAX_LEN, ack); in badblocks_set()
267 sector_t a = BB_OFFSET(p[hi]); in badblocks_set()
268 int lolen = BB_LEN(p[lo]); in badblocks_set()
269 int hilen = BB_LEN(p[hi]); in badblocks_set()
274 int ack = BB_ACK(p[lo]) && BB_ACK(p[hi]); in badblocks_set()
276 p[lo] = BB_MAKE(BB_OFFSET(p[lo]), newlen, ack); in badblocks_set()
277 memmove(p + hi, p + hi + 1, in badblocks_set()
293 memmove(p + hi + 1, p + hi, in badblocks_set()
299 p[hi] = BB_MAKE(s, this_sectors, acknowledged); in badblocks_set()
332 u64 *p; in badblocks_clear() local
351 p = bb->page; in badblocks_clear()
357 sector_t a = BB_OFFSET(p[mid]); in badblocks_clear()
369 if ((BB_OFFSET(p[lo]) + BB_LEN(p[lo]) > target) && in badblocks_clear()
370 (BB_OFFSET(p[lo]) < target)) { in badblocks_clear()
372 int ack = BB_ACK(p[lo]); in badblocks_clear()
373 sector_t a = BB_OFFSET(p[lo]); in badblocks_clear()
374 sector_t end = a + BB_LEN(p[lo]); in badblocks_clear()
382 memmove(p+lo+1, p+lo, (bb->count - lo) * 8); in badblocks_clear()
384 p[lo] = BB_MAKE(a, s-a, ack); in badblocks_clear()
387 p[lo] = BB_MAKE(target, end - target, ack); in badblocks_clear()
393 (BB_OFFSET(p[lo]) + BB_LEN(p[lo]) > s) && in badblocks_clear()
394 (BB_OFFSET(p[lo]) < target)) { in badblocks_clear()
396 if (BB_OFFSET(p[lo]) < s) { in badblocks_clear()
398 int ack = BB_ACK(p[lo]); in badblocks_clear()
399 sector_t start = BB_OFFSET(p[lo]); in badblocks_clear()
401 p[lo] = BB_MAKE(start, s - start, ack); in badblocks_clear()
411 memmove(p+lo+1, p+hi, (bb->count - hi) * 8); in badblocks_clear()
439 u64 *p = bb->page; in ack_all_badblocks() local
443 if (!BB_ACK(p[i])) { in ack_all_badblocks()
444 sector_t start = BB_OFFSET(p[i]); in ack_all_badblocks()
445 int len = BB_LEN(p[i]); in ack_all_badblocks()
447 p[i] = BB_MAKE(start, len, 1); in ack_all_badblocks()
469 u64 *p = bb->page; in badblocks_show() local
482 sector_t s = BB_OFFSET(p[i]); in badblocks_show()
483 unsigned int length = BB_LEN(p[i]); in badblocks_show()
484 int ack = BB_ACK(p[i]); in badblocks_show()