Lines Matching refs:offset
30 int offset, count; /* siamese twins */ in bit_map_string_get() local
55 offset = t->first_free; in bit_map_string_get()
57 offset = t->last_off & ~align1; in bit_map_string_get()
60 off_new = find_next_zero_bit(t->map, t->size, offset); in bit_map_string_get()
62 count += off_new - offset; in bit_map_string_get()
63 offset = off_new; in bit_map_string_get()
64 if (offset >= t->size) in bit_map_string_get()
65 offset = 0; in bit_map_string_get()
70 t->size, t->used, offset, len, align, count); in bit_map_string_get()
74 if (offset + len > t->size) { in bit_map_string_get()
75 count += t->size - offset; in bit_map_string_get()
76 offset = 0; in bit_map_string_get()
81 while (test_bit(offset + i, t->map) == 0) { in bit_map_string_get()
84 bitmap_set(t->map, offset, len); in bit_map_string_get()
85 if (offset == t->first_free) in bit_map_string_get()
89 if ((t->last_off = offset + len) >= t->size) in bit_map_string_get()
94 return offset; in bit_map_string_get()
98 if ((offset += i + 1) >= t->size) in bit_map_string_get()
99 offset = 0; in bit_map_string_get()
103 void bit_map_clear(struct bit_map *t, int offset, int len) in bit_map_clear() argument
111 if (test_bit(offset + i, t->map) == 0) in bit_map_clear()
113 __clear_bit(offset + i, t->map); in bit_map_clear()
115 if (offset < t->first_free) in bit_map_clear()
116 t->first_free = offset; in bit_map_clear()