Home
last modified time | relevance | path

Searched refs:bit (Results 1 – 25 of 63) sorted by relevance

123

/fs/omfs/
Dbitmap.c26 int addrlen, int bit, int max) in count_run() argument
32 x = find_next_bit(*addr, nbits, bit); in count_run()
33 count += x - bit; in count_run()
38 bit = 0; in count_run()
48 int nbits, int bit, int count, int set) in set_run() argument
60 for (i = 0; i < count; i++, bit++) { in set_run()
61 if (bit >= nbits) { in set_run()
62 bit = 0; in set_run()
73 set_bit(bit, sbi->s_imap[map]); in set_run()
74 set_bit(bit, (unsigned long *)bh->b_data); in set_run()
[all …]
/fs/ocfs2/
Dheartbeat.c45 int bit);
47 int bit);
86 int bit) in __ocfs2_node_map_set_bit() argument
88 set_bit(bit, map->map); in __ocfs2_node_map_set_bit()
93 int bit) in ocfs2_node_map_set_bit() argument
95 if (bit==-1) in ocfs2_node_map_set_bit()
97 BUG_ON(bit >= map->num_nodes); in ocfs2_node_map_set_bit()
99 __ocfs2_node_map_set_bit(map, bit); in ocfs2_node_map_set_bit()
104 int bit) in __ocfs2_node_map_clear_bit() argument
106 clear_bit(bit, map->map); in __ocfs2_node_map_clear_bit()
[all …]
Dheartbeat.h37 int bit);
40 int bit);
43 int bit);
/fs/yaffs2/
Dyaffs_ecc.c187 unsigned bit; in yaffs_ECCCorrect() local
198 bit = byte = 0; in yaffs_ECCCorrect()
218 bit |= 0x04; in yaffs_ECCCorrect()
220 bit |= 0x02; in yaffs_ECCCorrect()
222 bit |= 0x01; in yaffs_ECCCorrect()
224 data[byte] ^= (1 << bit); in yaffs_ECCCorrect()
285 unsigned bit; in yaffs_ECCCorrectOther() local
298 bit = 0; in yaffs_ECCCorrectOther()
301 bit |= 0x04; in yaffs_ECCCorrectOther()
303 bit |= 0x02; in yaffs_ECCCorrectOther()
[all …]
/fs/ntfs/
Dbitmap.c56 u8 bit; in __ntfs_bitmap_set_bits_in_run() local
88 bit = start_bit & 7; in __ntfs_bitmap_set_bits_in_run()
91 if (bit) { in __ntfs_bitmap_set_bits_in_run()
93 while ((bit & 7) && cnt) { in __ntfs_bitmap_set_bits_in_run()
96 *byte |= 1 << bit++; in __ntfs_bitmap_set_bits_in_run()
98 *byte &= ~(1 << bit++); in __ntfs_bitmap_set_bits_in_run()
149 bit = cnt; in __ntfs_bitmap_set_bits_in_run()
151 while (bit--) { in __ntfs_bitmap_set_bits_in_run()
153 *byte |= 1 << bit; in __ntfs_bitmap_set_bits_in_run()
155 *byte &= ~(1 << bit); in __ntfs_bitmap_set_bits_in_run()
Dbitmap.h97 static inline int ntfs_bitmap_set_bit(struct inode *vi, const s64 bit) in ntfs_bitmap_set_bit() argument
99 return ntfs_bitmap_set_run(vi, bit, 1); in ntfs_bitmap_set_bit()
111 static inline int ntfs_bitmap_clear_bit(struct inode *vi, const s64 bit) in ntfs_bitmap_clear_bit() argument
113 return ntfs_bitmap_clear_run(vi, bit, 1); in ntfs_bitmap_clear_bit()
Dmft.c1134 s64 pass_end, ll, data_pos, pass_start, ofs, bit; in ntfs_mft_bitmap_find_and_alloc_free_rec_nolock() local
1200 bit = data_pos & 7; in ntfs_mft_bitmap_find_and_alloc_free_rec_nolock()
1204 (long long)data_pos, (long long)bit); in ntfs_mft_bitmap_find_and_alloc_free_rec_nolock()
1205 for (; bit < size && data_pos + bit < pass_end; in ntfs_mft_bitmap_find_and_alloc_free_rec_nolock()
1206 bit &= ~7ull, bit += 8) { in ntfs_mft_bitmap_find_and_alloc_free_rec_nolock()
1207 byte = buf + (bit >> 3); in ntfs_mft_bitmap_find_and_alloc_free_rec_nolock()
1211 if (b < 8 && b >= (bit & 7)) { in ntfs_mft_bitmap_find_and_alloc_free_rec_nolock()
1212 ll = data_pos + (bit & ~7ull) + b; in ntfs_mft_bitmap_find_and_alloc_free_rec_nolock()
1230 (long long)data_pos, (long long)bit); in ntfs_mft_bitmap_find_and_alloc_free_rec_nolock()
2246 s64 ll, bit, old_data_initialized, old_data_size; in ntfs_mft_record_alloc() local
[all …]
/fs/udf/
Dballoc.c166 unsigned long bit; in udf_bitmap_free_blocks() local
188 bit = block % (sb->s_blocksize << 3); in udf_bitmap_free_blocks()
193 if (bit + count > (sb->s_blocksize << 3)) { in udf_bitmap_free_blocks()
194 overflow = bit + count - (sb->s_blocksize << 3); in udf_bitmap_free_blocks()
203 if (udf_set_bit(bit + i, bh->b_data)) { in udf_bitmap_free_blocks()
204 udf_debug("bit %ld already set\n", bit + i); in udf_bitmap_free_blocks()
206 ((char *)bh->b_data)[(bit + i) >> 3]); in udf_bitmap_free_blocks()
235 int bit, block, block_group, group_start; in udf_bitmap_prealloc_blocks() local
259 bit = block % (sb->s_blocksize << 3); in udf_bitmap_prealloc_blocks()
261 while (bit < (sb->s_blocksize << 3) && block_count > 0) { in udf_bitmap_prealloc_blocks()
[all …]
/fs/ufs/
Dialloc.c65 unsigned ino, cg, bit; in ufs_free_inode() local
84 bit = ufs_inotocgoff (ino); in ufs_free_inode()
103 if (ubh_isclr (UCPI_UBH(ucpi), ucpi->c_iusedoff, bit)) in ufs_free_inode()
106 ubh_clrbit (UCPI_UBH(ucpi), ucpi->c_iusedoff, bit); in ufs_free_inode()
192 unsigned cg, bit, i, j, start; in ufs_new_inode() local
261 bit = ubh_find_next_zero_bit (UCPI_UBH(ucpi), ucpi->c_iusedoff, uspi->s_ipg, start); in ufs_new_inode()
262 if (!(bit < uspi->s_ipg)) { in ufs_new_inode()
263 bit = ubh_find_first_zero_bit (UCPI_UBH(ucpi), ucpi->c_iusedoff, start); in ufs_new_inode()
264 if (!(bit < start)) { in ufs_new_inode()
271 UFSD("start = %u, bit = %u, ipg = %u\n", start, bit, uspi->s_ipg); in ufs_new_inode()
[all …]
Dutil.h353 #define ubh_blkmap(ubh,begin,bit) \ argument
354 …((*ubh_get_addr(ubh, (begin) + ((bit) >> 3)) >> ((bit) & 7)) & (0xff >> (UFS_MAXFRAG - uspi->s_fpb…
386 #define ubh_setbit(ubh,begin,bit) \ argument
387 (*ubh_get_addr(ubh, (begin) + ((bit) >> 3)) |= (1 << ((bit) & 7)))
389 #define ubh_clrbit(ubh,begin,bit) \ argument
390 (*ubh_get_addr (ubh, (begin) + ((bit) >> 3)) &= ~(1 << ((bit) & 7)))
392 #define ubh_isset(ubh,begin,bit) \ argument
393 (*ubh_get_addr (ubh, (begin) + ((bit) >> 3)) & (1 << ((bit) & 7)))
395 #define ubh_isclr(ubh,begin,bit) (!ubh_isset(ubh,begin,bit)) argument
426 unsigned bit, i; in find_last_zero_bit() local
[all …]
Dballoc.c45 unsigned cgno, bit, end_bit, bbase, blkmap, i; in ufs_free_fragments() local
61 bit = ufs_dtogd(uspi, fragment); in ufs_free_fragments()
76 end_bit = bit + count; in ufs_free_fragments()
77 bbase = ufs_blknum (bit); in ufs_free_fragments()
80 for (i = bit; i < end_bit; i++) { in ufs_free_fragments()
147 unsigned overflow, cgno, bit, end_bit, i; in ufs_free_blocks() local
169 bit = ufs_dtogd(uspi, fragment); in ufs_free_blocks()
174 end_bit = bit + count; in ufs_free_blocks()
176 overflow = bit + count - uspi->s_fpg; in ufs_free_blocks()
190 for (i = bit; i < end_bit; i += uspi->s_fpb) { in ufs_free_blocks()
/fs/affs/
Dbitmap.c66 u32 blk, bmap, bit, mask, tmp; in affs_free_block() local
76 bit = blk % sbi->s_bmap_bits; in affs_free_block()
91 mask = 1 << (bit & 31); in affs_free_block()
92 data = (__be32 *)bh->b_data + bit / 32 + 1; in affs_free_block()
145 u32 blk, bmap, bit, mask, mask2, tmp; in affs_alloc_block() local
205 bit = blk % sbi->s_bmap_bits; in affs_alloc_block()
206 data = (__be32 *)bh->b_data + bit / 32 + 1; in affs_alloc_block()
208 mask = ~0UL << (bit & 31); in affs_alloc_block()
229 bit = ffs(tmp & mask) - 1; in affs_alloc_block()
230 blk += bit + sbi->s_reserved; in affs_alloc_block()
[all …]
/fs/xfs/
Dxfs_rtalloc.c931 int bit; /* bit number in the word */ in xfs_rtcheck_range() local
959 bit = (int)(start & (XFS_NBWORD - 1)); in xfs_rtcheck_range()
968 if (bit) { in xfs_rtcheck_range()
972 lastbit = XFS_RTMIN(bit + len, XFS_NBWORD); in xfs_rtcheck_range()
976 mask = (((xfs_rtword_t)1 << (lastbit - bit)) - 1) << bit; in xfs_rtcheck_range()
985 i = XFS_RTLOBIT(wdiff) - bit; in xfs_rtcheck_range()
990 i = lastbit - bit; in xfs_rtcheck_range()
1147 int bit; /* bit number in the word */ in xfs_rtfind_back() local
1174 bit = (int)(start & (XFS_NBWORD - 1)); in xfs_rtfind_back()
1180 want = (*b & ((xfs_rtword_t)1 << bit)) ? -1 : 0; in xfs_rtfind_back()
[all …]
Dxfs_buf_item.c787 uint bit; in xfs_buf_item_log() local
818 bit = first_bit & (uint)(NBWORD - 1); in xfs_buf_item_log()
828 if (bit) { in xfs_buf_item_log()
829 end_bit = MIN(bit + bits_to_set, (uint)NBWORD); in xfs_buf_item_log()
830 mask = ((1 << (end_bit - bit)) - 1) << bit; in xfs_buf_item_log()
833 bits_set = end_bit - bit; in xfs_buf_item_log()
/fs/minix/
Dbitmap.c58 unsigned long bit, zone; in minix_free_block() local
65 bit = zone & ((1<<k) - 1); in minix_free_block()
73 if (!minix_test_and_clear_bit(bit, bh->b_data)) in minix_free_block()
197 unsigned long ino, bit; in minix_free_inode() local
204 bit = ino & ((1<<k) - 1); in minix_free_inode()
215 if (!minix_test_and_clear_bit(bit, bh->b_data)) in minix_free_inode()
216 printk("minix_free_inode: bit %lu already cleared\n", bit); in minix_free_inode()
/fs/ocfs2/dlm/
Ddlmcommon.h862 #define dlm_lockres_set_refmap_bit(bit,res) \ argument
863 __dlm_lockres_set_refmap_bit(bit,res,__FILE__,__LINE__)
864 #define dlm_lockres_clear_refmap_bit(bit,res) \ argument
865 __dlm_lockres_clear_refmap_bit(bit,res,__FILE__,__LINE__)
867 static inline void __dlm_lockres_set_refmap_bit(int bit, in __dlm_lockres_set_refmap_bit() argument
874 set_bit(bit, res->refmap); in __dlm_lockres_set_refmap_bit()
877 static inline void __dlm_lockres_clear_refmap_bit(int bit, in __dlm_lockres_clear_refmap_bit() argument
884 clear_bit(bit, res->refmap); in __dlm_lockres_clear_refmap_bit()
1103 int bit; in dlm_node_iter_next() local
1104 bit = find_next_bit(iter->node_map, O2NM_MAX_NODES, iter->curnode+1); in dlm_node_iter_next()
[all …]
Ddlmmaster.c720 int bit, wait_on_recovery = 0; in dlm_get_lock_resource() local
852 bit = find_next_bit(dlm->recovery_map, O2NM_MAX_NODES, 0); in dlm_get_lock_resource()
853 if (bit < O2NM_MAX_NODES) { in dlm_get_lock_resource()
856 dlm->name, namelen, (char *)lockid, bit); in dlm_get_lock_resource()
906 bit = find_next_bit(dlm->recovery_map, O2NM_MAX_NODES, 0); in dlm_get_lock_resource()
907 if (bit < O2NM_MAX_NODES) { in dlm_get_lock_resource()
910 dlm->name, namelen, (char *)lockid, bit); in dlm_get_lock_resource()
917 dlm_wait_for_node_recovery(dlm, bit, 10000); in dlm_get_lock_resource()
1000 int ret, bit; in dlm_wait_for_lock_mastery() local
1075 bit = find_next_bit(mle->maybe_map, O2NM_MAX_NODES, 0); in dlm_wait_for_lock_mastery()
[all …]
/fs/ext3/
Dresize.c202 ext3_grpblk_t bit; in setup_new_group_blocks() local
229 for (i = 0, bit = 1, block = start + 1; in setup_new_group_blocks()
230 i < gdblocks; i++, block++, bit++) { in setup_new_group_blocks()
233 ext3_debug("update backup group %#04lx (+%d)\n", block, bit); in setup_new_group_blocks()
253 ext3_set_bit(bit, bh->b_data); in setup_new_group_blocks()
258 for (i = 0, bit = gdblocks + 1, block = start + bit; in setup_new_group_blocks()
259 i < reserved_gdb; i++, block++, bit++) { in setup_new_group_blocks()
262 ext3_debug("clear reserved block %#04lx (+%d)\n", block, bit); in setup_new_group_blocks()
273 ext3_set_bit(bit, bh->b_data); in setup_new_group_blocks()
284 for (i = 0, block = input->inode_table, bit = block - start; in setup_new_group_blocks()
[all …]
Dialloc.c97 unsigned long bit; in ext3_free_inode() local
143 bit = (ino - 1) % EXT3_INODES_PER_GROUP(sb); in ext3_free_inode()
155 bit, bitmap_bh->b_data)) in ext3_free_inode()
640 int bit; in ext3_orphan_get() local
653 bit = (ino - 1) % EXT3_INODES_PER_GROUP(sb); in ext3_orphan_get()
665 if (!ext3_test_bit(bit, bitmap_bh->b_data)) in ext3_orphan_get()
692 bit, (unsigned long long)bitmap_bh->b_blocknr, in ext3_orphan_get()
693 ext3_test_bit(bit, bitmap_bh->b_data)); in ext3_orphan_get()
/fs/ext4/
Dresize.c186 ext4_grpblk_t bit; in setup_new_group_blocks() local
213 for (i = 0, bit = 1, block = start + 1; in setup_new_group_blocks()
214 i < gdblocks; i++, block++, bit++) { in setup_new_group_blocks()
217 ext4_debug("update backup group %#04llx (+%d)\n", block, bit); in setup_new_group_blocks()
236 ext4_set_bit(bit, bh->b_data); in setup_new_group_blocks()
241 for (i = 0, bit = gdblocks + 1, block = start + bit; in setup_new_group_blocks()
242 i < reserved_gdb; i++, block++, bit++) { in setup_new_group_blocks()
245 ext4_debug("clear reserved block %#04llx (+%d)\n", block, bit); in setup_new_group_blocks()
255 ext4_set_bit(bit, bh->b_data); in setup_new_group_blocks()
266 for (i = 0, block = input->inode_table, bit = block - start; in setup_new_group_blocks()
[all …]
Dballoc.c93 int bit, bit_max; in ext4_init_block_bitmap() local
148 for (bit = 0; bit < bit_max; bit++) in ext4_init_block_bitmap()
149 ext4_set_bit(bit, bh->b_data); in ext4_init_block_bitmap()
391 ext4_grpblk_t bit; in ext4_add_groupblocks() local
404 ext4_get_group_no_and_offset(sb, block, &block_group, &bit); in ext4_add_groupblocks()
410 if (bit + count > EXT4_BLOCKS_PER_GROUP(sb)) { in ext4_add_groupblocks()
458 bit + i, bitmap_bh->b_data)) { in ext4_add_groupblocks()
Dmballoc.c346 static inline void *mb_correct_addr_and_bit(int *bit, void *addr) in mb_correct_addr_and_bit() argument
349 *bit += ((unsigned long) addr & 7UL) << 3; in mb_correct_addr_and_bit()
352 *bit += ((unsigned long) addr & 3UL) << 3; in mb_correct_addr_and_bit()
360 static inline int mb_test_bit(int bit, void *addr) in mb_test_bit() argument
366 addr = mb_correct_addr_and_bit(&bit, addr); in mb_test_bit()
367 return ext4_test_bit(bit, addr); in mb_test_bit()
370 static inline void mb_set_bit(int bit, void *addr) in mb_set_bit() argument
372 addr = mb_correct_addr_and_bit(&bit, addr); in mb_set_bit()
373 ext4_set_bit(bit, addr); in mb_set_bit()
376 static inline void mb_set_bit_atomic(spinlock_t *lock, int bit, void *addr) in mb_set_bit_atomic() argument
[all …]
/fs/gfs2/
Drgrp.c85 const unsigned int bit = (block % GFS2_NBBY) * GFS2_BIT_SIZE; in gfs2_setbit() local
92 cur_state = (*byte1 >> bit) & GFS2_BIT_MASK; in gfs2_setbit()
98 *byte1 ^= (cur_state ^ new_state) << bit; in gfs2_setbit()
102 cur_state = (*byte2 >> bit) & GFS2_BIT_MASK; in gfs2_setbit()
103 *byte2 ^= (cur_state ^ new_state) << bit; in gfs2_setbit()
121 unsigned int bit; in gfs2_testbit() local
124 bit = (block % GFS2_NBBY) * GFS2_BIT_SIZE; in gfs2_testbit()
129 cur_state = (*byte >> bit) & GFS2_BIT_MASK; in gfs2_testbit()
153 int bit, startbit; in gfs2_bitfit() local
165 startbit = bit = (goal % GFS2_NBBY) * GFS2_BIT_SIZE; in gfs2_bitfit()
[all …]
/fs/jffs2/
Dcompr_rubin.c54 static inline int pushbit(struct pushpull *pp, int bit, int use_reserved) in pushbit() argument
59 if (bit) in pushbit()
76 int bit; in pullbit() local
78 bit = (pp->buf[pp->ofs >> 3] >> (7-(pp->ofs & 7))) & 1; in pullbit()
81 return bit; in pullbit()
/fs/
Dselect.c399 unsigned long in, out, ex, all_bits, bit = 1, mask, j; in do_select() local
411 for (j = 0; j < __NFDBITS; ++j, ++i, bit <<= 1) { in do_select()
415 if (!(bit & all_bits)) in do_select()
424 if ((mask & POLLIN_SET) && (in & bit)) { in do_select()
425 res_in |= bit; in do_select()
428 if ((mask & POLLOUT_SET) && (out & bit)) { in do_select()
429 res_out |= bit; in do_select()
432 if ((mask & POLLEX_SET) && (ex & bit)) { in do_select()
433 res_ex |= bit; in do_select()

123