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()
715 size_t iw = bit >> (sb->s_blocksize_bits + 3); in wnd_set_free() local
719 while (iw < wnd->nwnd && bits) { in wnd_set_free()
722 if (iw + 1 == wnd->nwnd) in wnd_set_free()
728 bh = wnd_map(wnd, iw); in wnd_set_free()
738 wnd->free_bits[iw] += op; in wnd_set_free()
748 iw += 1; in wnd_set_free()
764 size_t iw = bit >> (sb->s_blocksize_bits + 3); in wnd_set_used() local
769 while (iw < wnd->nwnd && bits) { in wnd_set_used()
772 if (unlikely(iw + 1 == wnd->nwnd)) in wnd_set_used()
778 bh = wnd_map(wnd, iw); in wnd_set_used()
787 wnd->free_bits[iw] -= op; in wnd_set_used()
797 iw += 1; in wnd_set_used()
852 size_t iw = bit >> (sb->s_blocksize_bits + 3); in wnd_is_free_hlp() local
856 while (iw < wnd->nwnd && bits) { in wnd_is_free_hlp()
859 if (unlikely(iw + 1 == wnd->nwnd)) in wnd_is_free_hlp()
865 if (wbits != wnd->free_bits[iw]) { in wnd_is_free_hlp()
867 struct buffer_head *bh = wnd_map(wnd, iw); in wnd_is_free_hlp()
881 iw += 1; in wnd_is_free_hlp()
928 size_t iw = bit >> (sb->s_blocksize_bits + 3); in wnd_is_used() local
948 while (iw < wnd->nwnd && bits) { in wnd_is_used()
951 if (unlikely(iw + 1 == wnd->nwnd)) in wnd_is_used()
957 if (wnd->free_bits[iw]) { in wnd_is_used()
959 struct buffer_head *bh = wnd_map(wnd, iw); in wnd_is_used()
972 iw += 1; in wnd_is_used()
993 size_t iw, prev_tail, nwnd, wbit, ebit, zbit, zend; in wnd_find() local
1148 iw = hint >> log2_bits; in wnd_find()
1163 for (; iw < nwnd; iw++) { in wnd_find()
1164 wbit = iw << log2_bits; in wnd_find()
1166 if (!wnd->free_bits[iw]) { in wnd_find()
1178 if (unlikely(iw + 1 == nwnd)) { in wnd_find()
1204 if (wnd->free_bits[iw] == wzend - wzbit) { in wnd_find()
1211 bh = wnd_map(wnd, iw); in wnd_find()
1254 if (!wpos && fbits_valid && wnd->free_bits[iw] == wbits) { in wnd_find()
1268 bh = wnd_map(wnd, iw); in wnd_find()
1342 size_t bits, iw, new_wnd; in wnd_extend() local
1371 for (iw = old_bits >> (sb->s_blocksize_bits + 3); bits; iw += 1) { in wnd_extend()
1377 if (iw + 1 == new_wnd) in wnd_extend()
1381 vbo = (u64)iw * blocksize; in wnd_extend()
1395 wnd->total_zeroes += frb - wnd->free_bits[iw]; in wnd_extend()
1396 wnd->free_bits[iw] = frb; in wnd_extend()
1439 size_t iw = lcn_from >> (sb->s_blocksize_bits + 3); in ntfs_trim_fs() local
1453 for (; iw < wnd->nwnd; iw++, wbit = 0) { in ntfs_trim_fs()
1454 CLST lcn_wnd = iw * wbits; in ntfs_trim_fs()
1460 if (!wnd->free_bits[iw]) in ntfs_trim_fs()
1463 if (iw + 1 == wnd->nwnd) in ntfs_trim_fs()
1469 bh = wnd_map(wnd, iw); in ntfs_trim_fs()