Home
last modified time | relevance | path

Searched refs:bmap (Results 1 – 25 of 112) sorted by relevance

12345

/kernel/linux/linux-5.10/fs/nilfs2/
Dbmap.c22 struct inode *nilfs_bmap_get_dat(const struct nilfs_bmap *bmap) in nilfs_bmap_get_dat() argument
24 struct the_nilfs *nilfs = bmap->b_inode->i_sb->s_fs_info; in nilfs_bmap_get_dat()
29 static int nilfs_bmap_convert_error(struct nilfs_bmap *bmap, in nilfs_bmap_convert_error() argument
32 struct inode *inode = bmap->b_inode; in nilfs_bmap_convert_error()
62 int nilfs_bmap_lookup_at_level(struct nilfs_bmap *bmap, __u64 key, int level, in nilfs_bmap_lookup_at_level() argument
68 down_read(&bmap->b_sem); in nilfs_bmap_lookup_at_level()
69 ret = bmap->b_ops->bop_lookup(bmap, key, level, ptrp); in nilfs_bmap_lookup_at_level()
71 ret = nilfs_bmap_convert_error(bmap, __func__, ret); in nilfs_bmap_lookup_at_level()
74 if (NILFS_BMAP_USE_VBN(bmap)) { in nilfs_bmap_lookup_at_level()
75 ret = nilfs_dat_translate(nilfs_bmap_get_dat(bmap), *ptrp, in nilfs_bmap_lookup_at_level()
[all …]
Ddirect.c106 static int nilfs_direct_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr) in nilfs_direct_insert() argument
115 if (nilfs_direct_get_ptr(bmap, key) != NILFS_BMAP_INVALID_PTR) in nilfs_direct_insert()
118 if (NILFS_BMAP_USE_VBN(bmap)) { in nilfs_direct_insert()
119 req.bpr_ptr = nilfs_direct_find_target_v(bmap, key); in nilfs_direct_insert()
120 dat = nilfs_bmap_get_dat(bmap); in nilfs_direct_insert()
122 ret = nilfs_bmap_prepare_alloc_ptr(bmap, &req, dat); in nilfs_direct_insert()
128 nilfs_bmap_commit_alloc_ptr(bmap, &req, dat); in nilfs_direct_insert()
129 nilfs_direct_set_ptr(bmap, key, req.bpr_ptr); in nilfs_direct_insert()
131 if (!nilfs_bmap_dirty(bmap)) in nilfs_direct_insert()
132 nilfs_bmap_set_dirty(bmap); in nilfs_direct_insert()
[all …]
Dbmap.h126 #define NILFS_BMAP_USE_VBN(bmap) ((bmap)->b_ptr_type > 0) argument
149 int nilfs_bmap_insert(struct nilfs_bmap *bmap, __u64 key, unsigned long rec);
150 int nilfs_bmap_delete(struct nilfs_bmap *bmap, __u64 key);
151 int nilfs_bmap_seek_key(struct nilfs_bmap *bmap, __u64 start, __u64 *keyp);
152 int nilfs_bmap_last_key(struct nilfs_bmap *bmap, __u64 *keyp);
153 int nilfs_bmap_truncate(struct nilfs_bmap *bmap, __u64 key);
167 static inline int nilfs_bmap_lookup(struct nilfs_bmap *bmap, __u64 key, in nilfs_bmap_lookup() argument
170 return nilfs_bmap_lookup_at_level(bmap, key, 1, ptr); in nilfs_bmap_lookup()
178 static inline int nilfs_bmap_prepare_alloc_ptr(struct nilfs_bmap *bmap, in nilfs_bmap_prepare_alloc_ptr() argument
185 req->bpr_ptr = bmap->b_last_allocated_ptr++; in nilfs_bmap_prepare_alloc_ptr()
[all …]
/kernel/linux/linux-5.10/lib/
Dtest_bitmap.c73 const unsigned long *exp_bmap, const unsigned long *bmap, in __check_eq_bitmap() argument
76 if (!bitmap_equal(exp_bmap, bmap, nbits)) { in __check_eq_bitmap()
79 nbits, exp_bmap, nbits, bmap); in __check_eq_bitmap()
178 DECLARE_BITMAP(bmap, 1024); in test_zero_clear()
181 memset(bmap, 0xff, 128); in test_zero_clear()
183 expect_eq_pbl("0-22", bmap, 23); in test_zero_clear()
184 expect_eq_pbl("0-1023", bmap, 1024); in test_zero_clear()
187 bitmap_clear(bmap, 0, 9); in test_zero_clear()
188 expect_eq_pbl("9-1023", bmap, 1024); in test_zero_clear()
190 bitmap_zero(bmap, 35); in test_zero_clear()
[all …]
/kernel/linux/linux-5.10/fs/xfs/
Dxfs_bmap_item.c282 struct xfs_map_extent *bmap, in xfs_trans_set_bmap_flags() argument
287 bmap->me_flags = 0; in xfs_trans_set_bmap_flags()
291 bmap->me_flags = type; in xfs_trans_set_bmap_flags()
297 bmap->me_flags |= XFS_BMAP_EXTENT_UNWRITTEN; in xfs_trans_set_bmap_flags()
299 bmap->me_flags |= XFS_BMAP_EXTENT_ATTR_FORK; in xfs_trans_set_bmap_flags()
307 struct xfs_bmap_intent *bmap) in xfs_bmap_update_log_item() argument
323 map->me_owner = bmap->bi_owner->i_ino; in xfs_bmap_update_log_item()
324 map->me_startblock = bmap->bi_bmap.br_startblock; in xfs_bmap_update_log_item()
325 map->me_startoff = bmap->bi_bmap.br_startoff; in xfs_bmap_update_log_item()
326 map->me_len = bmap->bi_bmap.br_blockcount; in xfs_bmap_update_log_item()
[all …]
/kernel/linux/linux-5.10/tools/testing/selftests/kvm/x86_64/
Dvmx_dirty_log_test.c73 unsigned long *bmap; in main() local
115 bmap = bitmap_alloc(TEST_MEM_PAGES); in main()
136 kvm_vm_get_dirty_log(vm, TEST_MEM_SLOT_INDEX, bmap); in main()
138 TEST_ASSERT(test_bit(0, bmap), "Page 0 incorrectly reported clean\n"); in main()
141 TEST_ASSERT(!test_bit(0, bmap), "Page 0 incorrectly reported dirty\n"); in main()
145 TEST_ASSERT(!test_bit(1, bmap), "Page 1 incorrectly reported dirty\n"); in main()
147 TEST_ASSERT(!test_bit(2, bmap), "Page 2 incorrectly reported dirty\n"); in main()
/kernel/linux/patches/linux-4.19/prebuilts/usr/include/linux/netfilter/
Dxt_TCPOPTSTRIP.h9 #define tcpoptstrip_set_bit(bmap, idx) \ argument
10 (bmap[(idx) >> 5] |= 1U << (idx & 31))
11 #define tcpoptstrip_test_bit(bmap, idx) \ argument
12 (((1U << (idx & 31)) & bmap[(idx) >> 5]) != 0)
/kernel/linux/patches/linux-5.10/prebuilts/usr/include/linux/netfilter/
Dxt_TCPOPTSTRIP.h22 #define tcpoptstrip_set_bit(bmap,idx) (bmap[(idx) >> 5] |= 1U << (idx & 31)) argument
23 #define tcpoptstrip_test_bit(bmap,idx) (((1U << (idx & 31)) & bmap[(idx) >> 5]) != 0) argument
/kernel/linux/linux-5.10/include/uapi/linux/netfilter/
Dxt_TCPOPTSTRIP.h7 #define tcpoptstrip_set_bit(bmap, idx) \ argument
8 (bmap[(idx) >> 5] |= 1U << (idx & 31))
9 #define tcpoptstrip_test_bit(bmap, idx) \ argument
10 (((1U << (idx & 31)) & bmap[(idx) >> 5]) != 0)
/kernel/linux/linux-5.10/fs/affs/
Dbitmap.c44 u32 blk, bmap, bit, mask, tmp; in affs_free_block() local
53 bmap = blk / sbi->s_bmap_bits; in affs_free_block()
55 bm = &sbi->s_bitmap[bmap]; in affs_free_block()
60 if (sbi->s_last_bmap != bmap) { in affs_free_block()
66 sbi->s_last_bmap = bmap; in affs_free_block()
122 u32 blk, bmap, bit, mask, mask2, tmp; in affs_alloc_block() local
145 bmap = blk / sbi->s_bmap_bits; in affs_alloc_block()
146 bm = &sbi->s_bitmap[bmap]; in affs_alloc_block()
159 bmap++; in affs_alloc_block()
161 if (bmap < sbi->s_bmap_count) in affs_alloc_block()
[all …]
/kernel/linux/linux-5.10/drivers/crypto/marvell/octeontx/
Dotx_cptpf_ucode.c60 struct otx_cpt_bitmap bmap = { {0} }; in get_cores_bmap() local
67 return bmap; in get_cores_bmap()
72 bitmap_or(bmap.bits, bmap.bits, in get_cores_bmap()
73 eng_grp->engs[i].bmap, in get_cores_bmap()
75 bmap.size = eng_grp->g->engs_num; in get_cores_bmap()
83 return bmap; in get_cores_bmap()
179 struct otx_cpt_bitmap bmap; in cpt_set_ucode_base() local
182 bmap = get_cores_bmap(&cpt->pdev->dev, eng_grp); in cpt_set_ucode_base()
183 if (!bmap.size) in cpt_set_ucode_base()
196 for_each_set_bit(i, bmap.bits, bmap.size) in cpt_set_ucode_base()
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/brocade/bna/
Dbnad_ethtool.c532 u32 bmap; in bnad_get_strings() local
545 bmap = bna_tx_rid_mask(&bnad->bna); in bnad_get_strings()
546 for (i = 0; bmap; i++) { in bnad_get_strings()
547 if (bmap & 1) { in bnad_get_strings()
573 bmap >>= 1; in bnad_get_strings()
576 bmap = bna_rx_rid_mask(&bnad->bna); in bnad_get_strings()
577 for (i = 0; bmap; i++) { in bnad_get_strings()
578 if (bmap & 1) { in bnad_get_strings()
600 bmap >>= 1; in bnad_get_strings()
713 u32 bmap; in bnad_get_stats_count_locked() local
[all …]
/kernel/linux/linux-5.10/include/media/
Dmedia-entity.h73 unsigned long *bmap; member
455 bitmap_zero(ent_enum->bmap, ent_enum->idx_max); in media_entity_enum_zero()
470 __set_bit(entity->internal_idx, ent_enum->bmap); in media_entity_enum_set()
485 __clear_bit(entity->internal_idx, ent_enum->bmap); in media_entity_enum_clear()
502 return test_bit(entity->internal_idx, ent_enum->bmap); in media_entity_enum_test()
521 return __test_and_set_bit(entity->internal_idx, ent_enum->bmap); in media_entity_enum_test_and_set()
533 return bitmap_empty(ent_enum->bmap, ent_enum->idx_max); in media_entity_enum_empty()
551 return bitmap_intersects(ent_enum1->bmap, ent_enum2->bmap, in media_entity_enum_intersects()
/kernel/linux/linux-5.10/fs/jfs/
Djfs_dmap.c64 static void dbAllocBits(struct bmap * bmp, struct dmap * dp, s64 blkno,
70 static int dbAdjCtl(struct bmap * bmp, s64 blkno, int newval, int alloc,
72 static int dbAllocAny(struct bmap * bmp, s64 nblocks, int l2nb, s64 * results);
73 static int dbAllocNext(struct bmap * bmp, struct dmap * dp, s64 blkno,
75 static int dbAllocNear(struct bmap * bmp, struct dmap * dp, s64 blkno,
78 static int dbAllocDmap(struct bmap * bmp, struct dmap * dp, s64 blkno,
80 static int dbAllocDmapLev(struct bmap * bmp, struct dmap * dp, int nblocks,
83 static int dbAllocAG(struct bmap * bmp, int agno, s64 nblocks, int l2nb,
85 static int dbAllocCtl(struct bmap * bmp, s64 nblocks, int l2nb, s64 blkno,
89 static int dbFindCtl(struct bmap * bmp, int l2nb, int level, s64 * blkno);
[all …]
Dfile.c66 atomic_inc(&jfs_sb->bmap->db_active[ji->active_ag]); in jfs_open()
79 struct bmap *bmap = JFS_SBI(inode->i_sb)->bmap; in jfs_release() local
80 atomic_dec(&bmap->db_active[ji->active_ag]); in jfs_release()
Djfs_discard.c68 struct bmap *bmp = JFS_SBI(ip->i_sb)->bmap; in jfs_ioc_trim()
Dinode.c173 struct bmap *bmap = JFS_SBI(inode->i_sb)->bmap; in jfs_evict_inode() local
174 atomic_dec(&bmap->db_active[ji->active_ag]); in jfs_evict_inode()
367 .bmap = jfs_bmap,
/kernel/linux/linux-5.10/drivers/net/ethernet/qlogic/qed/
Dqed_rdma.h186 struct qed_bmap *bmap, u32 max_count, char *name);
189 qed_rdma_bmap_free(struct qed_hwfn *p_hwfn, struct qed_bmap *bmap, bool check);
193 struct qed_bmap *bmap, u32 *id_num);
196 qed_bmap_set_id(struct qed_hwfn *p_hwfn, struct qed_bmap *bmap, u32 id_num);
199 qed_bmap_release_id(struct qed_hwfn *p_hwfn, struct qed_bmap *bmap, u32 id_num);
202 qed_bmap_test_id(struct qed_hwfn *p_hwfn, struct qed_bmap *bmap, u32 id_num);
Dqed_rdma.c38 struct qed_bmap *bmap, u32 max_count, char *name) in qed_rdma_bmap_alloc() argument
42 bmap->max_count = max_count; in qed_rdma_bmap_alloc()
44 bmap->bitmap = kcalloc(BITS_TO_LONGS(max_count), sizeof(long), in qed_rdma_bmap_alloc()
46 if (!bmap->bitmap) in qed_rdma_bmap_alloc()
49 snprintf(bmap->name, QED_RDMA_MAX_BMAP_NAME, "%s", name); in qed_rdma_bmap_alloc()
56 struct qed_bmap *bmap, u32 *id_num) in qed_rdma_bmap_alloc_id() argument
58 *id_num = find_first_zero_bit(bmap->bitmap, bmap->max_count); in qed_rdma_bmap_alloc_id()
59 if (*id_num >= bmap->max_count) in qed_rdma_bmap_alloc_id()
62 __set_bit(*id_num, bmap->bitmap); in qed_rdma_bmap_alloc_id()
65 bmap->name, *id_num); in qed_rdma_bmap_alloc_id()
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/chelsio/libcxgb/
Dlibcxgb_ppm.c84 static int ppm_find_unused_entries(unsigned long *bmap, in ppm_find_unused_entries() argument
92 i = bitmap_find_next_zero_area(bmap, max_ppods, start, nr, align_mask); in ppm_find_unused_entries()
95 i = bitmap_find_next_zero_area(bmap, max_ppods, 0, start - 1, in ppm_find_unused_entries()
100 bitmap_set(bmap, i, nr); in ppm_find_unused_entries()
133 i = ppm_find_unused_entries(pool->bmap, ppm->pool_index_max, in ppm_get_cpu_entries()
204 bitmap_clear(pool->bmap, i, count); in ppm_unmark_entries()
351 unsigned int bmap; in ppm_alloc_cpu_pool() local
361 bmap = ppmax / BITS_PER_TYPE(unsigned long); in ppm_alloc_cpu_pool()
362 if (!bmap) in ppm_alloc_cpu_pool()
365 ppmax = (bmap * sizeof(unsigned long)) << 3; in ppm_alloc_cpu_pool()
[all …]
/kernel/linux/linux-5.10/tools/testing/selftests/kvm/
Ddirty_log_test.c290 static void vm_dirty_log_verify(enum vm_guest_mode mode, unsigned long *bmap) in vm_dirty_log_verify() argument
302 TEST_ASSERT(test_bit_le(page, bmap), in vm_dirty_log_verify()
308 if (test_and_clear_bit_le(page, bmap)) { in vm_dirty_log_verify()
383 unsigned long *bmap; in run_test() local
430 bmap = bitmap_alloc(host_num_pages); in run_test()
471 bmap, host_num_pages); in run_test()
472 vm_dirty_log_verify(mode, bmap); in run_test()
485 free(bmap); in run_test()
Ddirty_log_perf_test.c100 unsigned long *bmap; in run_test() local
121 bmap = bitmap_alloc(host_num_pages); in run_test()
185 kvm_vm_get_dirty_log(vm, TEST_MEM_SLOT_INDEX, bmap); in run_test()
195 kvm_vm_clear_dirty_log(vm, TEST_MEM_SLOT_INDEX, bmap, 0, in run_test()
230 free(bmap); in run_test()
/kernel/linux/linux-5.10/arch/sparc/mm/
Dio-unit.c117 nexti: scan = find_next_zero_bit(iounit->bmap, limit, scan); in iounit_get_area()
130 if (test_bit(scan++, iounit->bmap)) in iounit_get_area()
137 set_bit(scan, iounit->bmap); in iounit_get_area()
191 clear_bit(vaddr, iounit->bmap); in iounit_unmap_page()
209 clear_bit(vaddr, iounit->bmap); in iounit_unmap_sg()
/kernel/linux/linux-5.10/arch/riscv/kernel/
Dcpufeature.c53 const unsigned long *bmap = (isa_bitmap) ? isa_bitmap : riscv_isa; in __riscv_isa_extension_available() local
58 return test_bit(bit, bmap) ? true : false; in __riscv_isa_extension_available()
/kernel/linux/linux-5.10/drivers/net/ethernet/marvell/octeontx2/af/
Drvu.c119 if (!rsrc->bmap) in rvu_alloc_rsrc()
122 id = find_first_zero_bit(rsrc->bmap, rsrc->max); in rvu_alloc_rsrc()
126 __set_bit(id, rsrc->bmap); in rvu_alloc_rsrc()
135 if (!rsrc->bmap) in rvu_alloc_rsrc_contig()
138 start = bitmap_find_next_zero_area(rsrc->bmap, rsrc->max, 0, nrsrc, 0); in rvu_alloc_rsrc_contig()
142 bitmap_set(rsrc->bmap, start, nrsrc); in rvu_alloc_rsrc_contig()
148 if (!rsrc->bmap) in rvu_free_rsrc_contig()
153 bitmap_clear(rsrc->bmap, start, nrsrc); in rvu_free_rsrc_contig()
160 if (!rsrc->bmap) in rvu_rsrc_check_contig()
163 start = bitmap_find_next_zero_area(rsrc->bmap, rsrc->max, 0, nrsrc, 0); in rvu_rsrc_check_contig()
[all …]

12345