Lines Matching refs:bit

27 		int addrlen, int bit, int max)  in count_run()  argument
33 x = find_next_bit(*addr, nbits, bit); in count_run()
34 count += x - bit; in count_run()
39 bit = 0; in count_run()
49 int nbits, int bit, int count, int set) in set_run() argument
61 for (i = 0; i < count; i++, bit++) { in set_run()
62 if (bit >= nbits) { in set_run()
63 bit = 0; in set_run()
74 set_bit(bit, sbi->s_imap[map]); in set_run()
75 set_bit(bit, (unsigned long *)bh->b_data); in set_run()
77 clear_bit(bit, sbi->s_imap[map]); in set_run()
78 clear_bit(bit, (unsigned long *)bh->b_data); in set_run()
96 unsigned int map, bit; in omfs_allocate_block() local
101 bit = do_div(tmp, bits_per_entry); in omfs_allocate_block()
105 if (map >= sbi->s_imap_size || test_and_set_bit(bit, sbi->s_imap[map])) in omfs_allocate_block()
113 set_bit(bit, (unsigned long *)bh->b_data); in omfs_allocate_block()
139 int i, run, bit; in omfs_allocate_range() local
143 bit = 0; in omfs_allocate_range()
144 while (bit < bits_per_entry) { in omfs_allocate_range()
145 bit = find_next_zero_bit(sbi->s_imap[i], bits_per_entry, in omfs_allocate_range()
146 bit); in omfs_allocate_range()
148 if (bit == bits_per_entry) in omfs_allocate_range()
152 sbi->s_imap_size-i, bit, max_request); in omfs_allocate_range()
156 bit += run; in omfs_allocate_range()
163 *return_block = (u64) i * bits_per_entry + bit; in omfs_allocate_range()
165 ret = set_run(sb, i, bits_per_entry, bit, run, 1); in omfs_allocate_range()
180 unsigned int map, bit; in omfs_clear_range() local
184 bit = do_div(tmp, bits_per_entry); in omfs_clear_range()
191 ret = set_run(sb, map, bits_per_entry, bit, count, 0); in omfs_clear_range()