Home
last modified time | relevance | path

Searched refs:eb (Results 1 – 25 of 101) sorted by relevance

12345

/kernel/linux/linux-5.10/fs/btrfs/
Dlocking.c121 static inline void btrfs_assert_spinning_writers_get(struct extent_buffer *eb) in btrfs_assert_spinning_writers_get() argument
123 WARN_ON(eb->spinning_writers); in btrfs_assert_spinning_writers_get()
124 eb->spinning_writers++; in btrfs_assert_spinning_writers_get()
127 static inline void btrfs_assert_spinning_writers_put(struct extent_buffer *eb) in btrfs_assert_spinning_writers_put() argument
129 WARN_ON(eb->spinning_writers != 1); in btrfs_assert_spinning_writers_put()
130 eb->spinning_writers--; in btrfs_assert_spinning_writers_put()
133 static inline void btrfs_assert_no_spinning_writers(struct extent_buffer *eb) in btrfs_assert_no_spinning_writers() argument
135 WARN_ON(eb->spinning_writers); in btrfs_assert_no_spinning_writers()
138 static inline void btrfs_assert_spinning_readers_get(struct extent_buffer *eb) in btrfs_assert_spinning_readers_get() argument
140 atomic_inc(&eb->spinning_readers); in btrfs_assert_spinning_readers_get()
[all …]
Dlocking.h88 void __btrfs_tree_lock(struct extent_buffer *eb, enum btrfs_lock_nesting nest);
89 void btrfs_tree_lock(struct extent_buffer *eb);
90 void btrfs_tree_unlock(struct extent_buffer *eb);
92 void __btrfs_tree_read_lock(struct extent_buffer *eb, enum btrfs_lock_nesting nest,
94 void btrfs_tree_read_lock(struct extent_buffer *eb);
95 void btrfs_tree_read_unlock(struct extent_buffer *eb);
96 void btrfs_tree_read_unlock_blocking(struct extent_buffer *eb);
97 void btrfs_set_lock_blocking_read(struct extent_buffer *eb);
98 void btrfs_set_lock_blocking_write(struct extent_buffer *eb);
99 int btrfs_try_tree_read_lock(struct extent_buffer *eb);
[all …]
Dprint-tree.c48 static void print_chunk(struct extent_buffer *eb, struct btrfs_chunk *chunk) in print_chunk() argument
50 int num_stripes = btrfs_chunk_num_stripes(eb, chunk); in print_chunk()
53 btrfs_chunk_length(eb, chunk), btrfs_chunk_owner(eb, chunk), in print_chunk()
54 btrfs_chunk_type(eb, chunk), num_stripes); in print_chunk()
57 btrfs_stripe_devid_nr(eb, chunk, i), in print_chunk()
58 btrfs_stripe_offset_nr(eb, chunk, i)); in print_chunk()
61 static void print_dev_item(struct extent_buffer *eb, in print_dev_item() argument
65 btrfs_device_id(eb, dev_item), in print_dev_item()
66 btrfs_device_total_bytes(eb, dev_item), in print_dev_item()
67 btrfs_device_bytes_used(eb, dev_item)); in print_dev_item()
[all …]
Dextent_io.c64 struct extent_buffer *eb; in btrfs_extent_buffer_leak_debug_check() local
76 eb = list_first_entry(&fs_info->allocated_ebs, in btrfs_extent_buffer_leak_debug_check()
80 eb->start, eb->len, atomic_read(&eb->refs), eb->bflags, in btrfs_extent_buffer_leak_debug_check()
81 btrfs_header_owner(eb)); in btrfs_extent_buffer_leak_debug_check()
82 list_del(&eb->leak_list); in btrfs_extent_buffer_leak_debug_check()
83 kmem_cache_free(extent_buffer_cache, eb); in btrfs_extent_buffer_leak_debug_check()
2334 int btrfs_repair_eb_io_failure(const struct extent_buffer *eb, int mirror_num) in btrfs_repair_eb_io_failure() argument
2336 struct btrfs_fs_info *fs_info = eb->fs_info; in btrfs_repair_eb_io_failure()
2337 u64 start = eb->start; in btrfs_repair_eb_io_failure()
2338 int i, num_pages = num_extent_pages(eb); in btrfs_repair_eb_io_failure()
[all …]
Dstruct-funcs.c10 static bool check_setget_bounds(const struct extent_buffer *eb, in check_setget_bounds() argument
15 if (member_offset > eb->len) { in check_setget_bounds()
16 btrfs_warn(eb->fs_info, in check_setget_bounds()
18 (unsigned long)ptr, eb->start, member_offset, size); in check_setget_bounds()
21 if (member_offset + size > eb->len) { in check_setget_bounds()
22 btrfs_warn(eb->fs_info, in check_setget_bounds()
24 (unsigned long)ptr, eb->start, member_offset, size); in check_setget_bounds()
68 ASSERT(check_setget_bounds(token->eb, ptr, off, size)); \
73 token->kaddr = page_address(token->eb->pages[idx]); \
79 token->kaddr = page_address(token->eb->pages[idx + 1]); \
[all …]
Dextent_io.h210 void free_extent_buffer(struct extent_buffer *eb);
211 void free_extent_buffer_stale(struct extent_buffer *eb);
215 int read_extent_buffer_pages(struct extent_buffer *eb, int wait,
217 void wait_on_extent_buffer_writeback(struct extent_buffer *eb);
219 static inline int num_extent_pages(const struct extent_buffer *eb) in num_extent_pages() argument
221 return (round_up(eb->start + eb->len, PAGE_SIZE) >> PAGE_SHIFT) - in num_extent_pages()
222 (eb->start >> PAGE_SHIFT); in num_extent_pages()
225 static inline int extent_buffer_uptodate(const struct extent_buffer *eb) in extent_buffer_uptodate() argument
227 return test_bit(EXTENT_BUFFER_UPTODATE, &eb->bflags); in extent_buffer_uptodate()
230 int memcmp_extent_buffer(const struct extent_buffer *eb, const void *ptrv,
[all …]
Duuid-tree.c27 struct extent_buffer *eb; in btrfs_uuid_tree_lookup() local
53 eb = path->nodes[0]; in btrfs_uuid_tree_lookup()
55 item_size = btrfs_item_size_nr(eb, slot); in btrfs_uuid_tree_lookup()
56 offset = btrfs_item_ptr_offset(eb, slot); in btrfs_uuid_tree_lookup()
68 read_extent_buffer(eb, &data, offset, sizeof(data)); in btrfs_uuid_tree_lookup()
90 struct extent_buffer *eb; in btrfs_uuid_tree_add() local
116 eb = path->nodes[0]; in btrfs_uuid_tree_add()
118 offset = btrfs_item_ptr_offset(eb, slot); in btrfs_uuid_tree_add()
125 eb = path->nodes[0]; in btrfs_uuid_tree_add()
127 offset = btrfs_item_ptr_offset(eb, slot); in btrfs_uuid_tree_add()
[all …]
Dbackref.c28 const struct extent_buffer *eb, in check_extent_in_eb() argument
38 !btrfs_file_extent_compression(eb, fi) && in check_extent_in_eb()
39 !btrfs_file_extent_encryption(eb, fi) && in check_extent_in_eb()
40 !btrfs_file_extent_other_encoding(eb, fi)) { in check_extent_in_eb()
44 data_offset = btrfs_file_extent_offset(eb, fi); in check_extent_in_eb()
45 data_len = btrfs_file_extent_num_bytes(eb, fi); in check_extent_in_eb()
75 static int find_extent_in_eb(const struct extent_buffer *eb, in find_extent_in_eb() argument
93 nritems = btrfs_header_nritems(eb); in find_extent_in_eb()
95 btrfs_item_key_to_cpu(eb, &key, slot); in find_extent_in_eb()
98 fi = btrfs_item_ptr(eb, slot, struct btrfs_file_extent_item); in find_extent_in_eb()
[all …]
Dctree.h1410 struct extent_buffer *eb; member
1419 struct extent_buffer *eb) in btrfs_init_map_token() argument
1421 token->eb = eb; in btrfs_init_map_token()
1422 token->kaddr = page_address(eb->pages[0]); in btrfs_init_map_token()
1444 #define read_eb_member(eb, ptr, type, member, result) (\ argument
1445 read_extent_buffer(eb, (char *)(result), \
1450 #define write_eb_member(eb, ptr, type, member, result) (\ argument
1451 write_extent_buffer(eb, (char *)(result), \
1462 u##bits btrfs_get_##bits(const struct extent_buffer *eb, \
1464 void btrfs_set_##bits(const struct extent_buffer *eb, void *ptr, \
[all …]
Drelocation.c733 struct extent_buffer *eb; in create_reloc_root() local
751 ret = btrfs_copy_root(trans, root, root->commit_root, &eb, in create_reloc_root()
774 ret = btrfs_copy_root(trans, root, root->node, &eb, in create_reloc_root()
787 btrfs_set_root_bytenr(root_item, eb->start); in create_reloc_root()
788 btrfs_set_root_level(root_item, btrfs_header_level(eb)); in create_reloc_root()
798 btrfs_tree_unlock(eb); in create_reloc_root()
799 free_extent_buffer(eb); in create_reloc_root()
1167 int memcmp_node_keys(struct extent_buffer *eb, int slot, in memcmp_node_keys() argument
1172 btrfs_node_key(eb, &key1, slot); in memcmp_node_keys()
1193 struct extent_buffer *eb; in replace_path() local
[all …]
Dctree.c125 struct extent_buffer *eb; in btrfs_root_node() local
129 eb = rcu_dereference(root->node); in btrfs_root_node()
137 if (atomic_inc_not_zero(&eb->refs)) { in btrfs_root_node()
144 return eb; in btrfs_root_node()
404 struct extent_buffer *eb) { in tree_mod_dont_log() argument
408 if (eb && btrfs_header_level(eb) == 0) in tree_mod_dont_log()
422 struct extent_buffer *eb) in tree_mod_need_log() argument
427 if (eb && btrfs_header_level(eb) == 0) in tree_mod_need_log()
434 alloc_tree_mod_elem(struct extent_buffer *eb, int slot, in alloc_tree_mod_elem() argument
443 tm->logical = eb->start; in alloc_tree_mod_elem()
[all …]
Ddev-replace.c74 struct extent_buffer *eb; in btrfs_init_dev_replace() local
125 eb = path->nodes[0]; in btrfs_init_dev_replace()
126 item_size = btrfs_item_size_nr(eb, slot); in btrfs_init_dev_replace()
127 ptr = btrfs_item_ptr(eb, slot, struct btrfs_dev_replace_item); in btrfs_init_dev_replace()
135 src_devid = btrfs_dev_replace_src_devid(eb, ptr); in btrfs_init_dev_replace()
137 btrfs_dev_replace_cont_reading_from_srcdev_mode(eb, ptr); in btrfs_init_dev_replace()
138 dev_replace->replace_state = btrfs_dev_replace_replace_state(eb, ptr); in btrfs_init_dev_replace()
139 dev_replace->time_started = btrfs_dev_replace_time_started(eb, ptr); in btrfs_init_dev_replace()
141 btrfs_dev_replace_time_stopped(eb, ptr); in btrfs_init_dev_replace()
143 btrfs_dev_replace_num_write_errors(eb, ptr)); in btrfs_init_dev_replace()
[all …]
Dtree-checker.c50 static void generic_err(const struct extent_buffer *eb, int slot, in generic_err() argument
53 const struct btrfs_fs_info *fs_info = eb->fs_info; in generic_err()
64 btrfs_header_level(eb) == 0 ? "leaf" : "node", in generic_err()
65 btrfs_header_owner(eb), btrfs_header_bytenr(eb), slot, &vaf); in generic_err()
75 static void file_extent_err(const struct extent_buffer *eb, int slot, in file_extent_err() argument
78 const struct btrfs_fs_info *fs_info = eb->fs_info; in file_extent_err()
83 btrfs_item_key_to_cpu(eb, &key, slot); in file_extent_err()
91 btrfs_header_level(eb) == 0 ? "leaf" : "node", in file_extent_err()
92 btrfs_header_owner(eb), btrfs_header_bytenr(eb), slot, in file_extent_err()
134 static void dir_item_err(const struct extent_buffer *eb, int slot, in dir_item_err() argument
[all …]
Ddisk-io.c188 void btrfs_set_buffer_lockdep_class(u64 objectid, struct extent_buffer *eb, in btrfs_set_buffer_lockdep_class() argument
200 lockdep_set_class_and_name(&eb->lock, in btrfs_set_buffer_lockdep_class()
238 struct extent_buffer *eb, u64 parent_transid, in verify_parent_transid() argument
245 if (!parent_transid || btrfs_header_generation(eb) == parent_transid) in verify_parent_transid()
252 btrfs_tree_read_lock(eb); in verify_parent_transid()
253 btrfs_set_lock_blocking_read(eb); in verify_parent_transid()
256 lock_extent_bits(io_tree, eb->start, eb->start + eb->len - 1, in verify_parent_transid()
258 if (extent_buffer_uptodate(eb) && in verify_parent_transid()
259 btrfs_header_generation(eb) == parent_transid) { in verify_parent_transid()
263 btrfs_err_rl(eb->fs_info, in verify_parent_transid()
[all …]
Dtree-log.c291 int (*process_func)(struct btrfs_root *log, struct extent_buffer *eb,
299 struct extent_buffer *eb, in process_one_buffer() argument
310 ret = btrfs_read_buffer(eb, gen, level, NULL); in process_one_buffer()
316 ret = btrfs_pin_extent_for_log_replay(wc->trans, eb->start, in process_one_buffer()
317 eb->len); in process_one_buffer()
319 if (!ret && btrfs_buffer_uptodate(eb, gen, 0)) { in process_one_buffer()
320 if (wc->pin && btrfs_header_level(eb) == 0) in process_one_buffer()
321 ret = btrfs_exclude_logged_extents(eb); in process_one_buffer()
323 btrfs_write_tree_block(eb); in process_one_buffer()
325 btrfs_wait_tree_block_writeback(eb); in process_one_buffer()
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/i915/gem/selftests/
Di915_gem_execbuffer.c19 static int __igt_gpu_reloc(struct i915_execbuffer *eb, in __igt_gpu_reloc() argument
24 GENMASK_ULL(eb->reloc_cache.use_64bit_reloc ? 63 : 31, 0); in __igt_gpu_reloc()
31 vma = i915_vma_instance(obj, eb->context->vm, NULL); in __igt_gpu_reloc()
35 err = i915_gem_object_lock(obj, &eb->ww); in __igt_gpu_reloc()
39 err = i915_vma_pin_ww(vma, &eb->ww, 0, 0, PIN_USER | PIN_HIGH); in __igt_gpu_reloc()
44 err = __reloc_entry_gpu(eb, vma, offsets[0] * sizeof(u32), 0); in __igt_gpu_reloc()
49 err = __reloc_entry_gpu(eb, vma, offsets[1] * sizeof(u32), 1); in __igt_gpu_reloc()
55 i -= eb->reloc_cache.rq_size; in __igt_gpu_reloc()
56 memset32(eb->reloc_cache.rq_cmd + eb->reloc_cache.rq_size, in __igt_gpu_reloc()
58 eb->reloc_cache.rq_size += i; in __igt_gpu_reloc()
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/i915/gem/
Di915_gem_execbuffer.c306 static int eb_parse(struct i915_execbuffer *eb);
307 static struct i915_request *eb_pin_engine(struct i915_execbuffer *eb,
309 static void eb_unpin_engine(struct i915_execbuffer *eb);
311 static inline bool eb_use_cmdparser(const struct i915_execbuffer *eb) in eb_use_cmdparser() argument
313 return intel_engine_requires_cmd_parser(eb->engine) || in eb_use_cmdparser()
314 (intel_engine_using_cmd_parser(eb->engine) && in eb_use_cmdparser()
315 eb->args->batch_len); in eb_use_cmdparser()
318 static int eb_create(struct i915_execbuffer *eb) in eb_create() argument
320 if (!(eb->args->flags & I915_EXEC_HANDLE_LUT)) { in eb_create()
321 unsigned int size = 1 + ilog2(eb->buffer_count); in eb_create()
[all …]
/kernel/linux/linux-5.10/drivers/mtd/
Dmtdswap.c184 static loff_t mtdswap_eb_offset(struct mtdswap_dev *d, struct swap_eb *eb) in mtdswap_eb_offset() argument
186 return (loff_t)(eb - d->eb_data) * d->mtd->erasesize; in mtdswap_eb_offset()
189 static void mtdswap_eb_detach(struct mtdswap_dev *d, struct swap_eb *eb) in mtdswap_eb_detach() argument
194 if (eb->root) { in mtdswap_eb_detach()
195 tp = container_of(eb->root, struct mtdswap_tree, root); in mtdswap_eb_detach()
199 rb_erase(&eb->rb, eb->root); in mtdswap_eb_detach()
203 static void __mtdswap_rb_add(struct rb_root *root, struct swap_eb *eb) in __mtdswap_rb_add() argument
212 if (eb->erase_count > cur->erase_count) in __mtdswap_rb_add()
218 rb_link_node(&eb->rb, parent, p); in __mtdswap_rb_add()
219 rb_insert_color(&eb->rb, root); in __mtdswap_rb_add()
[all …]
/kernel/linux/linux-5.10/fs/btrfs/tests/
Dextent-buffer-tests.c17 struct extent_buffer *eb; in test_btrfs_split_item() local
51 path->nodes[0] = eb = alloc_dummy_extent_buffer(fs_info, nodesize); in test_btrfs_split_item()
52 if (!eb) { in test_btrfs_split_item()
65 write_extent_buffer(eb, value, btrfs_item_ptr_offset(eb, 0), in test_btrfs_split_item()
85 btrfs_item_key_to_cpu(eb, &key, 0); in test_btrfs_split_item()
94 if (btrfs_item_size(eb, item) != strlen(split1)) { in test_btrfs_split_item()
100 read_extent_buffer(eb, buf, btrfs_item_ptr_offset(eb, 0), in test_btrfs_split_item()
110 btrfs_item_key_to_cpu(eb, &key, 1); in test_btrfs_split_item()
119 if (btrfs_item_size(eb, item) != strlen(split2)) { in test_btrfs_split_item()
125 read_extent_buffer(eb, buf, btrfs_item_ptr_offset(eb, 1), in test_btrfs_split_item()
[all …]
Dextent-io-tests.c271 static int check_eb_bitmap(unsigned long *bitmap, struct extent_buffer *eb, in check_eb_bitmap() argument
280 bit1 = !!extent_buffer_test_bit(eb, 0, i); in check_eb_bitmap()
286 bit1 = !!extent_buffer_test_bit(eb, i / BITS_PER_BYTE, in check_eb_bitmap()
296 static int __test_eb_bitmaps(unsigned long *bitmap, struct extent_buffer *eb, in __test_eb_bitmaps() argument
304 memzero_extent_buffer(eb, 0, len); in __test_eb_bitmaps()
305 if (memcmp_extent_buffer(eb, bitmap, 0, len) != 0) { in __test_eb_bitmaps()
311 extent_buffer_bitmap_set(eb, 0, 0, len * BITS_PER_BYTE); in __test_eb_bitmaps()
312 ret = check_eb_bitmap(bitmap, eb, len); in __test_eb_bitmaps()
319 extent_buffer_bitmap_clear(eb, 0, 0, len * BITS_PER_BYTE); in __test_eb_bitmaps()
320 ret = check_eb_bitmap(bitmap, eb, len); in __test_eb_bitmaps()
[all …]
/kernel/linux/linux-5.10/drivers/mtd/tests/
Dstresstest.c45 unsigned int eb; in rand_eb() local
48 eb = prandom_u32(); in rand_eb()
50 eb %= (ebcnt - 1); in rand_eb()
51 if (bbt[eb]) in rand_eb()
53 return eb; in rand_eb()
76 int eb = rand_eb(); in do_read() local
81 if (bbt[eb + 1]) { in do_read()
87 addr = (loff_t)eb * mtd->erasesize + offs; in do_read()
93 int eb = rand_eb(), offs, err, len; in do_write() local
96 offs = offsets[eb]; in do_write()
[all …]
Dtorturetest.c28 static int eb = 8; variable
29 module_param(eb, int, S_IRUGO);
30 MODULE_PARM_DESC(eb, "eraseblock number within the selected MTD device");
187 ebcnt, eb, eb + ebcnt - 1, dev); in tort_init()
247 err = mtdtest_scan_for_bad_eraseblocks(mtd, bad_ebs, eb, ebcnt); in tort_init()
256 err = mtdtest_erase_good_eraseblocks(mtd, bad_ebs, eb, ebcnt); in tort_init()
262 for (i = eb; i < eb + ebcnt; i++) { in tort_init()
263 if (bad_ebs[i - eb]) in tort_init()
279 for (i = eb; i < eb + ebcnt; i++) { in tort_init()
280 if (bad_ebs[i - eb]) in tort_init()
[all …]
Dmtd_test.c42 unsigned int eb, int ebcnt) in mtdtest_scan_for_bad_eraseblocks() argument
51 bbt[i] = is_block_bad(mtd, eb + i) ? 1 : 0; in mtdtest_scan_for_bad_eraseblocks()
62 unsigned int eb, int ebcnt) in mtdtest_erase_good_eraseblocks() argument
70 err = mtdtest_erase_eraseblock(mtd, eb + i); in mtdtest_erase_good_eraseblocks()
/kernel/linux/linux-5.10/arch/sparc/kernel/
Dbtext.c268 unsigned int *eb = (int *)expand_bits_16; in draw_byte_16() local
273 base[0] = (eb[bits >> 6] & fg) ^ bg; in draw_byte_16()
274 base[1] = (eb[(bits >> 4) & 3] & fg) ^ bg; in draw_byte_16()
275 base[2] = (eb[(bits >> 2) & 3] & fg) ^ bg; in draw_byte_16()
276 base[3] = (eb[bits & 3] & fg) ^ bg; in draw_byte_16()
286 unsigned int *eb = (int *)expand_bits_8; in draw_byte_8() local
291 base[0] = (eb[bits >> 4] & fg) ^ bg; in draw_byte_8()
292 base[1] = (eb[bits & 0xf] & fg) ^ bg; in draw_byte_8()
/kernel/linux/linux-5.10/drivers/input/mouse/
Dsynaptics.h113 #define SYN_EXT_BUTTON_STICK_L(eb) (((eb) & BIT(0)) >> 0) argument
114 #define SYN_EXT_BUTTON_STICK_M(eb) (((eb) & BIT(1)) >> 1) argument
115 #define SYN_EXT_BUTTON_STICK_R(eb) (((eb) & BIT(2)) >> 2) argument

12345