Lines Matching defs:bits
37 static bool wnd_is_free_hlp(struct wnd_bitmap *wnd, size_t bit, size_t bits);
288 /* Check bits before 'bit'. */
299 /* Check bits after 'end_in'. */
707 * wnd_set_free - Mark the bits range from bit to bit + bits as free.
709 int wnd_set_free(struct wnd_bitmap *wnd, size_t bit, size_t bits)
713 size_t bits0 = bits;
719 while (iw < wnd->nwnd && bits) {
726 op = min_t(u32, tail, bits);
746 bits -= op;
757 * wnd_set_used - Mark the bits range from bit to bit + bits as used.
759 int wnd_set_used(struct wnd_bitmap *wnd, size_t bit, size_t bits)
763 size_t bits0 = bits;
769 while (iw < wnd->nwnd && bits) {
776 op = min_t(u32, tail, bits);
795 bits -= op;
807 * wnd_set_used_safe - Mark the bits range from bit to bit + bits as used.
811 * @done - how many bits were marked as used.
815 int wnd_set_used_safe(struct wnd_bitmap *wnd, size_t bit, size_t bits,
822 for (i = 0; i < bits; i++) {
847 * Return: True if all clusters [bit, bit+bits) are free (bitmap only).
849 static bool wnd_is_free_hlp(struct wnd_bitmap *wnd, size_t bit, size_t bits)
856 while (iw < wnd->nwnd && bits) {
863 op = min_t(u32, tail, bits);
879 bits -= op;
890 * Return: True if all clusters [bit, bit+bits) are free.
892 bool wnd_is_free(struct wnd_bitmap *wnd, size_t bit, size_t bits)
910 if (bit < end && bit + bits <= end)
914 ret = wnd_is_free_hlp(wnd, bit, bits);
922 * Return: True if all clusters [bit, bit+bits) are used.
924 bool wnd_is_used(struct wnd_bitmap *wnd, size_t bit, size_t bits)
938 end = bit + bits;
948 while (iw < wnd->nwnd && bits) {
955 op = min_t(u32, tail, bits);
970 bits -= op;
1104 /* Check if we can use more bits. */
1342 size_t bits, iw, new_wnd;
1367 /* Zero bits [old_bits,new_bits). */
1368 bits = new_bits - old_bits;
1371 for (iw = old_bits >> (sb->s_blocksize_bits + 3); bits; iw += 1) {
1380 op = b0 + bits > wbits ? wbits - b0 : bits;
1404 bits -= op;
1559 unsigned int ntfs_bitmap_weight_le(const void *bitmap, int bits)
1562 unsigned int k, lim = bits / BITS_PER_LONG;
1568 if (bits % BITS_PER_LONG) {
1570 BITMAP_LAST_WORD_MASK(bits));