Home
last modified time | relevance | path

Searched refs:nbits (Results 1 – 17 of 17) sorted by relevance

/fs/ntfs3/
Dbitfunc.c33 bool are_bits_clear(const void *lmap, size_t bit, size_t nbits) in are_bits_clear() argument
39 if (8 - pos >= nbits) in are_bits_clear()
40 return !nbits || !(*map & fill_mask[pos + nbits] & in are_bits_clear()
45 nbits -= 8 - pos; in are_bits_clear()
51 if (nbits >= pos * 8) { in are_bits_clear()
52 for (nbits -= pos * 8; pos; pos--, map++) { in are_bits_clear()
59 for (pos = nbits / BITS_IN_SIZE_T; pos; pos--, map += sizeof(size_t)) { in are_bits_clear()
64 for (pos = (nbits % BITS_IN_SIZE_T) >> 3; pos; pos--, map++) { in are_bits_clear()
69 pos = nbits & 7; in are_bits_clear()
81 bool are_bits_set(const void *lmap, size_t bit, size_t nbits) in are_bits_set() argument
[all …]
Dbitmap.c302 wnd->nbits : in wnd_add_free_ext()
571 if (wbit + wbits > wnd->nbits) in wnd_rescan()
572 wbits = wnd->nbits - wbit; in wnd_rescan()
622 wnd_add_free_ext(wnd, wnd->nbits - prev_tail, prev_tail, true); in wnd_rescan()
644 int wnd_init(struct wnd_bitmap *wnd, struct super_block *sb, size_t nbits) in wnd_init() argument
653 wnd->nbits = nbits; in wnd_init()
654 wnd->total_zeroes = nbits; in wnd_init()
657 wnd->nwnd = bytes_to_block(sb, ntfs3_bitmap_size(nbits)); in wnd_init()
658 wnd->bits_last = nbits & (wbits - 1); in wnd_init()
1019 max_alloc = wnd->nbits; in wnd_find()
[all …]
Dindex.c200 u32 nbits; member
233 bbuf->nbits = data_size * 8; in bmp_buf_get()
281 bbuf->nbits = 8 * blocksize; in bmp_buf_get()
370 u32 nbits = sb->s_blocksize * 8; in scan_nres_bitmap() local
389 from &= nbits - 1; in scan_nres_bitmap()
432 nbits = 8 * (data_size - vbo); in scan_nres_bitmap()
434 ok = nbits > from ? in scan_nres_bitmap()
435 (*fn)((ulong *)bh->b_data, from, nbits, ret) : in scan_nres_bitmap()
492 u32 nbits = 8 * le32_to_cpu(b->res.data_size); in indx_find_free() local
493 size_t pos = find_next_zero_bit_le(resident_data(b), nbits, 0); in indx_find_free()
[all …]
Dfsntfs.c399 if (lcn >= wnd->nbits) in ntfs_look_for_free_space()
507 new_mft_total = ALIGN(wnd->nbits + NTFS_MFT_INCREASE_STEP, 128); in ntfs_extend_mft()
588 mft_total = wnd->nbits; in ntfs_look_free_mft()
668 if (zbit + zlen > wnd->nbits) in ntfs_look_free_mft()
669 zlen = wnd->nbits - zbit; in ntfs_look_free_mft()
700 if (sbi->mft.next_free >= sbi->mft.bitmap.nbits) { in ntfs_look_free_mft()
702 sbi->mft.next_free = sbi->mft.bitmap.nbits; in ntfs_look_free_mft()
743 if (rno >= wnd->nbits) in ntfs_mark_rec_free()
825 (u64)sbi->mft.bitmap.nbits << sbi->record_bits); in ntfs_refresh_zone()
Dsuper.c468 sbi->cluster_size, sbi->used.bitmap.nbits, in ntfs3_volinfo()
469 sbi->mft.bitmap.nbits, in ntfs3_volinfo()
470 sbi->mft.bitmap.nbits - wnd_zeroes(&sbi->mft.bitmap), in ntfs3_volinfo()
664 buf->f_blocks = wnd->nbits; in ntfs_statfs()
1065 sbi->used.bitmap.nbits = clusters; in ntfs_init_from_boot()
1343 tt = sbi->used.bitmap.nbits; in ntfs_fill_super()
Dntfs_fs.h149 size_t nbits; member
483 bool are_bits_clear(const void *map, size_t bit, size_t nbits);
484 bool are_bits_set(const void *map, size_t bit, size_t nbits);
485 size_t get_set_bits_ex(const void *map, size_t bit, size_t nbits);
835 int wnd_init(struct wnd_bitmap *wnd, struct super_block *sb, size_t nbits);
Drun.c1006 if (lcn != SPARSE_LCN64 && lcn + len > sbi->used.bitmap.nbits) { in run_unpack()
/fs/xfs/
Dxfs_buf_item.c64 int nbits) in xfs_buf_item_straddle() argument
70 offset + ((first_bit + nbits) << XFS_BLF_SHIFT)); in xfs_buf_item_straddle()
72 if (last - first != nbits * XFS_BLF_CHUNK) in xfs_buf_item_straddle()
95 int nbits; in xfs_buf_item_size_segment() local
107 nbits = xfs_contig_bits(blfp->blf_data_map, in xfs_buf_item_size_segment()
109 ASSERT(nbits > 0); in xfs_buf_item_size_segment()
115 if (nbits > 1 && in xfs_buf_item_size_segment()
116 xfs_buf_item_straddle(bp, offset, first_bit, nbits)) in xfs_buf_item_size_segment()
120 *nbytes += nbits * XFS_BLF_CHUNK; in xfs_buf_item_size_segment()
129 (uint)first_bit + nbits + 1); in xfs_buf_item_size_segment()
[all …]
Dxfs_buf_item_recover.c454 int nbits; in xlog_recover_do_reg_buffer() local
467 nbits = xfs_contig_bits(buf_f->blf_data_map, in xlog_recover_do_reg_buffer()
469 ASSERT(nbits > 0); in xlog_recover_do_reg_buffer()
473 ((uint)bit << XFS_BLF_SHIFT) + (nbits << XFS_BLF_SHIFT)); in xlog_recover_do_reg_buffer()
483 if (item->ri_buf[i].i_len < (nbits << XFS_BLF_SHIFT)) in xlog_recover_do_reg_buffer()
484 nbits = item->ri_buf[i].i_len >> XFS_BLF_SHIFT; in xlog_recover_do_reg_buffer()
517 nbits<<XFS_BLF_SHIFT); /* length */ in xlog_recover_do_reg_buffer()
520 bit += nbits; in xlog_recover_do_reg_buffer()
595 int nbits = 0; in xlog_recover_do_inode_buffer() local
625 bit += nbits; in xlog_recover_do_inode_buffer()
[all …]
/fs/omfs/
Dbitmap.c13 int nbits = sb->s_blocksize * 8; in omfs_count_free() local
16 sum += nbits - bitmap_weight(sbi->s_imap[i], nbits); in omfs_count_free()
26 static int count_run(unsigned long **addr, int nbits, in count_run() argument
33 x = find_next_bit(*addr, nbits, bit); in count_run()
36 if (x < nbits || count > max) in count_run()
49 int nbits, int bit, int count, int set) in set_run() argument
62 if (bit >= nbits) { in set_run()
/fs/btrfs/
Dmisc.h146 unsigned long nbits) in bitmap_test_range_all_set() argument
150 found_zero = find_next_zero_bit(addr, start + nbits, start); in bitmap_test_range_all_set()
151 return (found_zero == start + nbits); in bitmap_test_range_all_set()
156 unsigned long nbits) in bitmap_test_range_all_zero() argument
160 found_set = find_next_bit(addr, start + nbits, start); in bitmap_test_range_all_zero()
161 return (found_set == start + nbits); in bitmap_test_range_all_zero()
Dsubpage.c245 const int nbits = len >> fs_info->sectorsize_bits; in btrfs_subpage_start_reader() local
249 atomic_add(nbits, &subpage->readers); in btrfs_subpage_start_reader()
256 const int nbits = len >> fs_info->sectorsize_bits; in btrfs_subpage_end_reader() local
262 ASSERT(atomic_read(&subpage->readers) >= nbits); in btrfs_subpage_end_reader()
263 last = atomic_sub_and_test(nbits, &subpage->readers); in btrfs_subpage_end_reader()
298 const int nbits = (len >> fs_info->sectorsize_bits); in btrfs_subpage_start_writer() local
304 ret = atomic_add_return(nbits, &subpage->writers); in btrfs_subpage_start_writer()
305 ASSERT(ret == nbits); in btrfs_subpage_start_writer()
312 const int nbits = (len >> fs_info->sectorsize_bits); in btrfs_subpage_end_and_test_writer() local
326 ASSERT(atomic_read(&subpage->writers) >= nbits); in btrfs_subpage_end_and_test_writer()
[all …]
Dextent_io.h62 #define BITMAP_LAST_BYTE_MASK(nbits) \ argument
63 (BYTE_MASK >> (-(nbits) & (BITS_PER_BYTE - 1)))
Dzoned.c1166 unsigned long nbits = size >> shift; in btrfs_ensure_empty_zones() local
1173 if (begin + nbits > zinfo->nr_zones) in btrfs_ensure_empty_zones()
1177 if (bitmap_test_range_all_zero(zinfo->seq_zones, begin, nbits)) in btrfs_ensure_empty_zones()
1181 if (bitmap_test_range_all_set(zinfo->seq_zones, begin, nbits) && in btrfs_ensure_empty_zones()
1182 bitmap_test_range_all_set(zinfo->empty_zones, begin, nbits)) in btrfs_ensure_empty_zones()
/fs/jfs/
Djfs_dmap.c453 int word, nbits, nwords; in dbUpdatePMap() local
514 rbits -= nbits, dbitno += nbits) { in dbUpdatePMap()
519 nbits = min(rbits, DBWORD - wbitno); in dbUpdatePMap()
522 if (nbits < DBWORD) { in dbUpdatePMap()
527 (ONES << (DBWORD - nbits) >> wbitno); in dbUpdatePMap()
542 nbits = nwords << L2DBWORD; in dbUpdatePMap()
/fs/xfs/libxfs/
Dxfs_btree.c831 int nbits, /* number of bits to inspect */ in xfs_btree_offsets() argument
851 for (i = nbits - 1, imask = 1u << i; ; i--, imask >>= 1) { in xfs_btree_offsets()
1567 int nbits; in xfs_btree_log_block() local
1579 nbits = XFS_BB_NUM_BITS_CRC; in xfs_btree_log_block()
1581 nbits = XFS_BB_NUM_BITS; in xfs_btree_log_block()
1586 nbits, &first, &last); in xfs_btree_log_block()
Dxfs_btree.h390 int nbits, /* number of bits to inspect */