Lines Matching refs:wpos

62 static size_t wnd_scan(const void *buf, size_t wbit, u32 wpos, u32 wend,  in wnd_scan()  argument
66 while (wpos < wend) { in wnd_scan()
69 u32 used = find_next_zero_bit_le(buf, wend, wpos); in wnd_scan()
81 if (used > wpos) { in wnd_scan()
82 wpos = used; in wnd_scan()
94 end = wpos + to_alloc - *prev_tail; in wnd_scan()
95 free_bits = find_next_bit_le(buf, min(end, wend), wpos); in wnd_scan()
97 free_len = *prev_tail + free_bits - wpos; in wnd_scan()
100 *b_pos = wbit + wpos - *prev_tail; in wnd_scan()
105 return wbit + wpos - *prev_tail; in wnd_scan()
108 *prev_tail += free_bits - wpos; in wnd_scan()
112 wpos = free_bits + 1; in wnd_scan()
508 size_t wpos, wbit, iw, vbo; in wnd_rescan() local
568 wpos = 0; in wnd_rescan()
575 used = find_next_zero_bit_le(bh->b_data, wbits, wpos); in wnd_rescan()
577 if (used > wpos && prev_tail) { in wnd_rescan()
578 wnd_add_free_ext(wnd, wbit + wpos - prev_tail, in wnd_rescan()
583 wpos = used; in wnd_rescan()
585 if (wpos >= wbits) { in wnd_rescan()
591 frb = find_next_bit_le(bh->b_data, wbits, wpos); in wnd_rescan()
594 prev_tail += frb - wpos; in wnd_rescan()
598 wnd_add_free_ext(wnd, wbit + wpos - prev_tail, in wnd_rescan()
599 frb + prev_tail - wpos, true); in wnd_rescan()
602 wpos = frb + 1; in wnd_rescan()
605 } while (wpos < wbits); in wnd_rescan()
991 u32 wbits, wpos, wzbit, wzend; in wnd_find() local
1150 wpos = hint & (wbits - 1); in wnd_find()
1174 wpos = 0; in wnd_find()
1206 wpos = 0; in wnd_find()
1216 wpos = 0; in wnd_find()
1221 if (wpos < wzbit) { in wnd_find()
1223 fnd = wnd_scan(bh->b_data, wbit, wpos, in wnd_find()
1238 max(wzend, wpos), wbits, in wnd_find()
1247 wpos = 0; in wnd_find()
1254 if (!wpos && fbits_valid && wnd->free_bits[iw] == wbits) { in wnd_find()
1257 fnd = wbit + wpos - prev_tail; in wnd_find()
1263 wpos = 0; in wnd_find()
1272 wpos = 0; in wnd_find()
1277 fnd = wnd_scan(bh->b_data, wbit, wpos, wbits, to_alloc, in wnd_find()