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
528 for (iw = 0; iw < wnd->nwnd; iw++) { in wnd_rescan()
529 if (iw + 1 == wnd->nwnd) in wnd_rescan()
533 if (!wnd->free_bits[iw]) { in wnd_rescan()
543 if (wbits == wnd->free_bits[iw]) { in wnd_rescan()
580 wnd->free_bits[iw] = frb; in wnd_rescan()
697 static struct buffer_head *wnd_map(struct wnd_bitmap *wnd, size_t iw) in wnd_map() argument
707 vbo = (u64)iw << sb->s_blocksize_bits; in wnd_map()
731 size_t iw = bit >> (sb->s_blocksize_bits + 3); in wnd_set_free() local
736 for (; iw < wnd->nwnd && bits; iw++, bit += op, bits -= op, wbit = 0) { in wnd_set_free()
737 if (iw + 1 == wnd->nwnd) in wnd_set_free()
742 bh = wnd_map(wnd, iw); in wnd_set_free()
752 wnd->free_bits[iw] += op; in wnd_set_free()
772 size_t iw = bit >> (sb->s_blocksize_bits + 3); in wnd_set_used() local
778 for (; iw < wnd->nwnd && bits; iw++, bit += op, bits -= op, wbit = 0) { in wnd_set_used()
779 if (unlikely(iw + 1 == wnd->nwnd)) in wnd_set_used()
784 bh = wnd_map(wnd, iw); in wnd_set_used()
793 wnd->free_bits[iw] -= op; in wnd_set_used()
853 size_t iw = bit >> (sb->s_blocksize_bits + 3); in wnd_is_free_hlp() local
858 for (; iw < wnd->nwnd && bits; iw++, bits -= op, wbit = 0) { in wnd_is_free_hlp()
859 if (unlikely(iw + 1 == wnd->nwnd)) in wnd_is_free_hlp()
864 if (wbits != wnd->free_bits[iw]) { in wnd_is_free_hlp()
866 struct buffer_head *bh = wnd_map(wnd, iw); in wnd_is_free_hlp()
923 size_t iw = bit >> (sb->s_blocksize_bits + 3); in wnd_is_used() local
944 for (; iw < wnd->nwnd && bits; iw++, bits -= op, wbit = 0) { in wnd_is_used()
945 if (unlikely(iw + 1 == wnd->nwnd)) in wnd_is_used()
950 if (wnd->free_bits[iw]) { in wnd_is_used()
952 struct buffer_head *bh = wnd_map(wnd, iw); in wnd_is_used()
982 size_t iw, prev_tail, nwnd, wbit, ebit, zbit, zend; in wnd_find() local
1137 iw = hint >> log2_bits; in wnd_find()
1152 for (; iw < nwnd; iw++) { in wnd_find()
1153 wbit = iw << log2_bits; in wnd_find()
1155 if (!wnd->free_bits[iw]) { in wnd_find()
1167 if (unlikely(iw + 1 == nwnd)) { in wnd_find()
1193 if (wnd->free_bits[iw] == wzend - wzbit) { in wnd_find()
1200 bh = wnd_map(wnd, iw); in wnd_find()
1243 if (!wpos && fbits_valid && wnd->free_bits[iw] == wbits) { in wnd_find()
1257 bh = wnd_map(wnd, iw); in wnd_find()
1331 size_t bits, iw, new_wnd; in wnd_extend() local
1360 for (iw = old_bits >> (sb->s_blocksize_bits + 3); bits; iw += 1) { in wnd_extend()
1366 if (iw + 1 == new_wnd) in wnd_extend()
1370 vbo = (u64)iw * blocksize; in wnd_extend()
1384 wnd->total_zeroes += frb - wnd->free_bits[iw]; in wnd_extend()
1385 wnd->free_bits[iw] = frb; in wnd_extend()
1429 size_t iw = lcn_from >> (sb->s_blocksize_bits + 3); in ntfs_trim_fs() local
1443 for (; iw < wnd->nwnd; iw++, wbit = 0) { in ntfs_trim_fs()
1444 CLST lcn_wnd = iw * wbits; in ntfs_trim_fs()
1450 if (!wnd->free_bits[iw]) in ntfs_trim_fs()
1453 if (iw + 1 == wnd->nwnd) in ntfs_trim_fs()
1459 bh = wnd_map(wnd, iw); in ntfs_trim_fs()