Lines Matching refs:iw
36 static struct buffer_head *wnd_map(struct wnd_bitmap *wnd, size_t iw);
508 size_t wpos, wbit, iw, vbo;
519 for (iw = 0; iw < wnd->nwnd; iw++) {
520 if (iw + 1 == wnd->nwnd)
524 if (!wnd->free_bits[iw]) {
534 if (wbits == wnd->free_bits[iw]) {
564 wnd->free_bits[iw] = frb;
680 static struct buffer_head *wnd_map(struct wnd_bitmap *wnd, size_t iw)
690 vbo = (u64)iw << sb->s_blocksize_bits;
715 size_t iw = bit >> (sb->s_blocksize_bits + 3);
719 while (iw < wnd->nwnd && bits) {
722 if (iw + 1 == wnd->nwnd)
728 bh = wnd_map(wnd, iw);
738 wnd->free_bits[iw] += op;
748 iw += 1;
764 size_t iw = bit >> (sb->s_blocksize_bits + 3);
769 while (iw < wnd->nwnd && bits) {
772 if (unlikely(iw + 1 == wnd->nwnd))
778 bh = wnd_map(wnd, iw);
787 wnd->free_bits[iw] -= op;
797 iw += 1;
852 size_t iw = bit >> (sb->s_blocksize_bits + 3);
856 while (iw < wnd->nwnd && bits) {
859 if (unlikely(iw + 1 == wnd->nwnd))
865 if (wbits != wnd->free_bits[iw]) {
867 struct buffer_head *bh = wnd_map(wnd, iw);
881 iw += 1;
928 size_t iw = bit >> (sb->s_blocksize_bits + 3);
948 while (iw < wnd->nwnd && bits) {
951 if (unlikely(iw + 1 == wnd->nwnd))
957 if (wnd->free_bits[iw]) {
959 struct buffer_head *bh = wnd_map(wnd, iw);
972 iw += 1;
993 size_t iw, prev_tail, nwnd, wbit, ebit, zbit, zend;
1148 iw = hint >> log2_bits;
1163 for (; iw < nwnd; iw++) {
1164 wbit = iw << log2_bits;
1166 if (!wnd->free_bits[iw]) {
1178 if (unlikely(iw + 1 == nwnd)) {
1204 if (wnd->free_bits[iw] == wzend - wzbit) {
1211 bh = wnd_map(wnd, iw);
1254 if (!wpos && fbits_valid && wnd->free_bits[iw] == wbits) {
1268 bh = wnd_map(wnd, iw);
1342 size_t bits, iw, new_wnd;
1371 for (iw = old_bits >> (sb->s_blocksize_bits + 3); bits; iw += 1) {
1377 if (iw + 1 == new_wnd)
1381 vbo = (u64)iw * blocksize;
1395 wnd->total_zeroes += frb - wnd->free_bits[iw];
1396 wnd->free_bits[iw] = frb;
1439 size_t iw = lcn_from >> (sb->s_blocksize_bits + 3);
1453 for (; iw < wnd->nwnd; iw++, wbit = 0) {
1454 CLST lcn_wnd = iw * wbits;
1460 if (!wnd->free_bits[iw])
1463 if (iw + 1 == wnd->nwnd)
1469 bh = wnd_map(wnd, iw);