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; in wnd_rescan() local
519 for (iw = 0; iw < wnd->nwnd; iw++) { in wnd_rescan()
520 if (iw + 1 == wnd->nwnd) in wnd_rescan()
524 if (!wnd->free_bits[iw]) { in wnd_rescan()
534 if (wbits == wnd->free_bits[iw]) { in wnd_rescan()
564 wnd->free_bits[iw] = frb; in wnd_rescan()
680 static struct buffer_head *wnd_map(struct wnd_bitmap *wnd, size_t iw) in wnd_map() argument
690 vbo = (u64)iw << sb->s_blocksize_bits; in wnd_map()
714 size_t iw = bit >> (sb->s_blocksize_bits + 3); in wnd_set_free() local
719 for (; iw < wnd->nwnd && bits; iw++, bit += op, bits -= op, wbit = 0) { in wnd_set_free()
720 if (iw + 1 == wnd->nwnd) in wnd_set_free()
725 bh = wnd_map(wnd, iw); in wnd_set_free()
735 wnd->free_bits[iw] += op; in wnd_set_free()
755 size_t iw = bit >> (sb->s_blocksize_bits + 3); in wnd_set_used() local
761 for (; iw < wnd->nwnd && bits; iw++, bit += op, bits -= op, wbit = 0) { in wnd_set_used()
762 if (unlikely(iw + 1 == wnd->nwnd)) in wnd_set_used()
767 bh = wnd_map(wnd, iw); in wnd_set_used()
776 wnd->free_bits[iw] -= op; in wnd_set_used()
836 size_t iw = bit >> (sb->s_blocksize_bits + 3); in wnd_is_free_hlp() local
841 for (; iw < wnd->nwnd && bits; iw++, bits -= op, wbit = 0) { in wnd_is_free_hlp()
842 if (unlikely(iw + 1 == wnd->nwnd)) in wnd_is_free_hlp()
847 if (wbits != wnd->free_bits[iw]) { in wnd_is_free_hlp()
849 struct buffer_head *bh = wnd_map(wnd, iw); in wnd_is_free_hlp()
906 size_t iw = bit >> (sb->s_blocksize_bits + 3); in wnd_is_used() local
927 for (; iw < wnd->nwnd && bits; iw++, bits -= op, wbit = 0) { in wnd_is_used()
928 if (unlikely(iw + 1 == wnd->nwnd)) in wnd_is_used()
933 if (wnd->free_bits[iw]) { in wnd_is_used()
935 struct buffer_head *bh = wnd_map(wnd, iw); in wnd_is_used()
965 size_t iw, prev_tail, nwnd, wbit, ebit, zbit, zend; in wnd_find() local
1120 iw = hint >> log2_bits; in wnd_find()
1135 for (; iw < nwnd; iw++) { in wnd_find()
1136 wbit = iw << log2_bits; in wnd_find()
1138 if (!wnd->free_bits[iw]) { in wnd_find()
1150 if (unlikely(iw + 1 == nwnd)) { in wnd_find()
1176 if (wnd->free_bits[iw] == wzend - wzbit) { in wnd_find()
1183 bh = wnd_map(wnd, iw); in wnd_find()
1226 if (!wpos && fbits_valid && wnd->free_bits[iw] == wbits) { in wnd_find()
1240 bh = wnd_map(wnd, iw); in wnd_find()
1314 size_t bits, iw, new_wnd; in wnd_extend() local
1343 for (iw = old_bits >> (sb->s_blocksize_bits + 3); bits; iw += 1) { in wnd_extend()
1349 if (iw + 1 == new_wnd) in wnd_extend()
1353 vbo = (u64)iw * blocksize; in wnd_extend()
1367 wnd->total_zeroes += frb - wnd->free_bits[iw]; in wnd_extend()
1368 wnd->free_bits[iw] = frb; in wnd_extend()
1411 size_t iw = lcn_from >> (sb->s_blocksize_bits + 3); in ntfs_trim_fs() local
1425 for (; iw < wnd->nwnd; iw++, wbit = 0) { in ntfs_trim_fs()
1426 CLST lcn_wnd = iw * wbits; in ntfs_trim_fs()
1432 if (!wnd->free_bits[iw]) in ntfs_trim_fs()
1435 if (iw + 1 == wnd->nwnd) in ntfs_trim_fs()
1441 bh = wnd_map(wnd, iw); in ntfs_trim_fs()