Home
last modified time | relevance | path

Searched refs:bytenr (Results 1 – 25 of 33) sorted by relevance

12

/fs/btrfs/
Dmisc.h70 u64 bytenr; member
73 static inline struct rb_node *rb_simple_search(struct rb_root *root, u64 bytenr) in rb_simple_search() argument
81 if (bytenr < entry->bytenr) in rb_simple_search()
83 else if (bytenr > entry->bytenr) in rb_simple_search()
91 static inline struct rb_node *rb_simple_insert(struct rb_root *root, u64 bytenr, in rb_simple_insert() argument
102 if (bytenr < entry->bytenr) in rb_simple_insert()
104 else if (bytenr > entry->bytenr) in rb_simple_insert()
Dref-verify.c64 u64 bytenr; member
85 if (entry->bytenr > be->bytenr) in insert_block_entry()
87 else if (entry->bytenr < be->bytenr) in insert_block_entry()
98 static struct block_entry *lookup_block_entry(struct rb_root *root, u64 bytenr) in lookup_block_entry() argument
106 if (entry->bytenr < bytenr) in lookup_block_entry()
108 else if (entry->bytenr > bytenr) in lookup_block_entry()
261 u64 bytenr, u64 len, in add_block_entry() argument
274 be->bytenr = bytenr; in add_block_entry()
310 u64 parent, u64 bytenr, int level) in add_tree_block() argument
329 be = add_block_entry(fs_info, bytenr, fs_info->nodesize, ref_root); in add_tree_block()
[all …]
Ddelayed-ref.c288 u64 bytenr; in htree_insert() local
292 bytenr = ins->bytenr; in htree_insert()
298 if (bytenr < entry->bytenr) { in htree_insert()
300 } else if (bytenr > entry->bytenr) { in htree_insert()
365 struct btrfs_delayed_ref_root *dr, u64 bytenr, in find_ref_head() argument
377 if (bytenr < entry->bytenr) in find_ref_head()
379 else if (bytenr > entry->bytenr) in find_ref_head()
385 if (bytenr > entry->bytenr) { in find_ref_head()
557 delayed_refs->run_delayed_start = head->bytenr + in btrfs_select_ref_head()
718 u64 bytenr, u64 num_bytes, u64 ref_root, in init_delayed_ref_head() argument
[all …]
Dfile-item.c182 u64 bytenr, int cow) in btrfs_lookup_csum() argument
195 file_key.offset = bytenr; in btrfs_lookup_csum()
210 csum_offset = (bytenr - found_key.offset) >> in btrfs_lookup_csum()
584 sums->bytenr = start; in btrfs_lookup_csums_range()
658 sums->bytenr = bio->bi_iter.bi_sector << 9; in btrfs_csum_one_bio()
710 sums->bytenr = (bio->bi_iter.bi_sector << 9) in btrfs_csum_one_bio()
748 u64 bytenr, u64 len) in truncate_one_csum() argument
753 u64 end_byte = bytenr + len; in truncate_one_csum()
761 if (key->offset < bytenr && csum_end <= end_byte) { in truncate_one_csum()
768 u32 new_size = (bytenr - key->offset) >> blocksize_bits; in truncate_one_csum()
[all …]
Dbackref.h44 struct btrfs_fs_info *fs_info, u64 bytenr,
48 struct btrfs_fs_info *fs_info, u64 bytenr,
65 int btrfs_check_shared(struct btrfs_root *root, u64 inum, u64 bytenr,
88 u64 bytenr; member
131 int btrfs_backref_iter_start(struct btrfs_backref_iter *iter, u64 bytenr);
146 iter->bytenr = 0; in btrfs_backref_iter_release()
167 u64 bytenr; member
275 struct btrfs_backref_cache *cache, u64 bytenr, int level);
362 u64 bytenr, int errno) in btrfs_backref_panic() argument
366 bytenr); in btrfs_backref_panic()
Dextent-tree.c116 struct btrfs_fs_info *fs_info, u64 bytenr, in btrfs_lookup_extent_info() argument
149 key.objectid = bytenr; in btrfs_lookup_extent_info()
165 if (key.objectid == bytenr && in btrfs_lookup_extent_info()
203 head = btrfs_find_delayed_ref_head(delayed_refs, bytenr); in btrfs_lookup_extent_info()
442 u64 bytenr, u64 parent, in lookup_extent_data_ref() argument
455 key.objectid = bytenr; in lookup_extent_data_ref()
494 if (key.objectid != bytenr || in lookup_extent_data_ref()
518 u64 bytenr, u64 parent, in insert_extent_data_ref() argument
529 key.objectid = bytenr; in insert_extent_data_ref()
685 u64 bytenr, u64 parent, in lookup_tree_block_ref() argument
[all …]
Dbackref.c394 static int is_shared_data_backref(struct preftrees *preftrees, u64 bytenr) in is_shared_data_backref() argument
402 target.parent = bytenr; in is_shared_data_backref()
884 node->bytenr, count, sc, in add_delayed_refs()
895 ref->parent, node->bytenr, count, in add_delayed_refs()
927 &key, 0, node->bytenr, count, sc, in add_delayed_refs()
938 node->bytenr, count, sc, in add_delayed_refs()
965 struct btrfs_path *path, u64 bytenr, in add_inline_refs() argument
1027 bytenr, 1, NULL, GFP_NOFS); in add_inline_refs()
1037 bytenr, count, sc, GFP_NOFS); in add_inline_refs()
1043 bytenr, 1, NULL, GFP_NOFS); in add_inline_refs()
[all …]
Ddelayed-ref.h27 u64 bytenr; member
72 u64 bytenr; member
245 u64 bytenr; member
265 int action, u64 bytenr, u64 len, u64 parent) in btrfs_init_generic_ref() argument
268 generic_ref->bytenr = bytenr; in btrfs_init_generic_ref()
353 u64 bytenr, u64 num_bytes,
361 u64 bytenr);
Drelocation.c83 u64 bytenr; member
99 u64 bytenr; member
163 in_range(node->bytenr, rc->block_group->start, in mark_block_processed()
166 set_extent_bits(&rc->processed_blocks, node->bytenr, in mark_block_processed()
167 node->bytenr + blocksize - 1, EXTENT_DIRTY); in mark_block_processed()
228 struct btrfs_backref_node *node, u64 bytenr) in update_backref_node() argument
232 node->bytenr = bytenr; in update_backref_node()
233 rb_node = rb_simple_insert(&cache->rb_root, node->bytenr, &node->rb_node); in update_backref_node()
235 btrfs_backref_panic(cache->fs_info, bytenr, -EEXIST); in update_backref_node()
281 if (node->bytenr == node->new_bytenr) in update_backref_cache()
[all …]
Dfree-space-cache.h106 u64 bytenr, u64 size,
109 u64 bytenr, u64 size);
111 u64 bytenr, u64 size);
113 u64 bytenr, u64 size);
115 u64 bytenr, u64 size);
Dcheck-integrity.c269 static int btrfsic_map_block(struct btrfsic_state *state, u64 bytenr, u32 len,
320 u64 bytenr,
1451 static int btrfsic_map_block(struct btrfsic_state *state, u64 bytenr, u32 len, in btrfsic_map_block() argument
1463 bytenr, &length, &multi, mirror_num); in btrfsic_map_block()
1485 block_ctx_out->start = bytenr; in btrfsic_map_block()
1707 u64 bytenr = 0; in btrfsic_process_written_block() local
1711 bytenr = btrfs_super_bytenr((struct btrfs_super_block *) in btrfsic_process_written_block()
1735 bytenr = btrfs_stack_header_bytenr( in btrfsic_process_written_block()
1738 btrfsic_cmp_log_and_dev_bytenr(state, bytenr, in btrfsic_process_written_block()
1743 if (block->logical_bytenr != bytenr && in btrfsic_process_written_block()
[all …]
Dblock-group.h239 struct btrfs_fs_info *info, u64 bytenr);
241 struct btrfs_fs_info *info, u64 bytenr);
249 bool btrfs_inc_nocow_writers(struct btrfs_fs_info *fs_info, u64 bytenr);
250 void btrfs_dec_nocow_writers(struct btrfs_fs_info *fs_info, u64 bytenr);
282 u64 bytenr, u64 num_bytes, int alloc);
Dblock-group.c212 struct btrfs_fs_info *info, u64 bytenr, int contains) in block_group_cache_tree_search() argument
226 if (bytenr < start) { in block_group_cache_tree_search()
230 } else if (bytenr > start) { in block_group_cache_tree_search()
231 if (contains && bytenr <= end) { in block_group_cache_tree_search()
243 if (bytenr == 0 && info->first_logical_byte > ret->start) in block_group_cache_tree_search()
255 struct btrfs_fs_info *info, u64 bytenr) in btrfs_lookup_first_block_group() argument
257 return block_group_cache_tree_search(info, bytenr, 0); in btrfs_lookup_first_block_group()
264 struct btrfs_fs_info *info, u64 bytenr) in btrfs_lookup_block_group() argument
266 return block_group_cache_tree_search(info, bytenr, 1); in btrfs_lookup_block_group()
296 bool btrfs_inc_nocow_writers(struct btrfs_fs_info *fs_info, u64 bytenr) in btrfs_inc_nocow_writers() argument
[all …]
Dqgroup.h109 u64 bytenr; member
317 int btrfs_qgroup_trace_extent(struct btrfs_trans_handle *trans, u64 bytenr,
341 int btrfs_qgroup_account_extent(struct btrfs_trans_handle *trans, u64 bytenr,
Dqgroup.c1763 u64 bytenr = record->bytenr; in btrfs_qgroup_trace_extent_nolock() local
1772 if (bytenr < entry->bytenr) { in btrfs_qgroup_trace_extent_nolock()
1774 } else if (bytenr > entry->bytenr) { in btrfs_qgroup_trace_extent_nolock()
1795 u64 bytenr = qrecord->bytenr; in btrfs_qgroup_trace_extent_post() local
1819 ret = btrfs_find_all_roots(NULL, trans->fs_info, bytenr, 0, &old_root, in btrfs_qgroup_trace_extent_post()
1840 int btrfs_qgroup_trace_extent(struct btrfs_trans_handle *trans, u64 bytenr, in btrfs_qgroup_trace_extent() argument
1849 || bytenr == 0 || num_bytes == 0) in btrfs_qgroup_trace_extent()
1856 record->bytenr = bytenr; in btrfs_qgroup_trace_extent()
1878 u64 bytenr, num_bytes; in btrfs_qgroup_trace_leaf_items() local
1897 bytenr = btrfs_file_extent_disk_bytenr(eb, fi); in btrfs_qgroup_trace_leaf_items()
[all …]
Ddisk-io.c1022 u64 bytenr, u64 owner_root, in btrfs_find_create_tree_block() argument
1026 return alloc_test_extent_buffer(fs_info, bytenr); in btrfs_find_create_tree_block()
1027 return alloc_extent_buffer(fs_info, bytenr, owner_root, level); in btrfs_find_create_tree_block()
1039 struct extent_buffer *read_tree_block(struct btrfs_fs_info *fs_info, u64 bytenr, in read_tree_block() argument
1046 buf = btrfs_find_create_tree_block(fs_info, bytenr, owner_root, level); in read_tree_block()
2357 u64 bytenr = btrfs_super_log_root(disk_super); in btrfs_replay_log() local
2370 log_tree_root->node = read_tree_block(fs_info, bytenr, in btrfs_replay_log()
3739 u64 bytenr, bytenr_orig; in btrfs_read_dev_one_super() local
3744 ret = btrfs_sb_log_location_bdev(bdev, copy_num, READ, &bytenr); in btrfs_read_dev_one_super()
3750 if (bytenr + BTRFS_SUPER_INFO_SIZE >= i_size_read(bdev->bd_inode)) in btrfs_read_dev_one_super()
[all …]
Ddisk-io.h45 struct extent_buffer *read_tree_block(struct btrfs_fs_info *fs_info, u64 bytenr,
50 u64 bytenr, u64 owner_root,
Dscrub.c388 static u64 get_full_stripe_logical(struct btrfs_block_group *cache, u64 bytenr) in get_full_stripe_logical() argument
402 ret = div64_u64(bytenr - cache->start, cache->full_stripe_len) * in get_full_stripe_logical()
418 static int lock_full_stripe(struct btrfs_fs_info *fs_info, u64 bytenr, in lock_full_stripe() argument
428 bg_cache = btrfs_lookup_block_group(fs_info, bytenr); in lock_full_stripe()
439 fstripe_start = get_full_stripe_logical(bg_cache, bytenr); in lock_full_stripe()
465 static int unlock_full_stripe(struct btrfs_fs_info *fs_info, u64 bytenr, in unlock_full_stripe() argument
479 bg_cache = btrfs_lookup_block_group(fs_info, bytenr); in unlock_full_stripe()
488 fstripe_start = get_full_stripe_logical(bg_cache, bytenr); in unlock_full_stripe()
2506 if (sum->bytenr > logical) in scrub_find_csum()
2515 if (sum->bytenr + sum->len <= logical) { in scrub_find_csum()
[all …]
Dtree-checker.c1209 u64 bytenr; in extent_err() local
1213 bytenr = key.objectid; in extent_err()
1228 eb->start, slot, bytenr, len, &vaf); in extent_err()
1813 u64 bytenr; in btrfs_check_node() local
1832 bytenr = btrfs_node_blockptr(node, slot); in btrfs_check_node()
1836 if (unlikely(!bytenr)) { in btrfs_check_node()
1842 if (unlikely(!IS_ALIGNED(bytenr, fs_info->sectorsize))) { in btrfs_check_node()
1845 bytenr, fs_info->sectorsize); in btrfs_check_node()
Dreada.c103 u64 bytenr; in __readahead_hook() local
147 bytenr = btrfs_node_blockptr(eb, i); in __readahead_hook()
171 reada_add_block(rc, bytenr, &next_key, in __readahead_hook()
659 static int reada_tree_block_flagged(struct btrfs_fs_info *fs_info, u64 bytenr, in reada_tree_block_flagged() argument
666 buf = btrfs_find_create_tree_block(fs_info, bytenr, owner_root, level); in reada_tree_block_flagged()
Dctree.h157 __le64 bytenr; /* which block this node is supposed to live in */ member
224 __le64 bytenr; /* this block number */ member
2188 BTRFS_SETGET_HEADER_FUNCS(header_bytenr, struct btrfs_header, bytenr, 64);
2200 BTRFS_SETGET_STACK_FUNCS(stack_header_bytenr, struct btrfs_header, bytenr, 64);
2243 BTRFS_SETGET_FUNCS(disk_root_bytenr, struct btrfs_root_item, bytenr, 64);
2248 BTRFS_SETGET_STACK_FUNCS(root_bytenr, struct btrfs_root_item, bytenr, 64);
2421 BTRFS_SETGET_STACK_FUNCS(super_bytenr, struct btrfs_super_block, bytenr, 64);
2731 struct btrfs_fs_info *fs_info, u64 bytenr,
2733 int btrfs_pin_extent(struct btrfs_trans_handle *trans, u64 bytenr, u64 num,
2736 u64 bytenr, u64 num_bytes);
[all …]
Dzoned.c102 u64 bytenr; in sb_write_pointer() local
104 bytenr = ((zones[i].start + zones[i].len) in sb_write_pointer()
108 bytenr >> PAGE_SHIFT, GFP_NOFS); in sb_write_pointer()
1467 sum->bytenr -= orig_logical - *logical; in btrfs_rewrite_logical_zoned()
1469 sum->bytenr += *logical - orig_logical; in btrfs_rewrite_logical_zoned()
Dfree-space-cache.c2542 u64 bytenr, u64 size, bool used) in __btrfs_add_free_space_zoned() argument
2546 u64 offset = bytenr - block_group->start; in __btrfs_add_free_space_zoned()
2588 u64 bytenr, u64 size) in btrfs_add_free_space() argument
2593 return __btrfs_add_free_space_zoned(block_group, bytenr, size, in btrfs_add_free_space()
2601 bytenr, size, trim_state); in btrfs_add_free_space()
2605 u64 bytenr, u64 size) in btrfs_add_free_space_unused() argument
2608 return __btrfs_add_free_space_zoned(block_group, bytenr, size, in btrfs_add_free_space_unused()
2611 return btrfs_add_free_space(block_group, bytenr, size); in btrfs_add_free_space_unused()
2620 u64 bytenr, u64 size) in btrfs_add_free_space_async_trimmed() argument
2625 return __btrfs_add_free_space_zoned(block_group, bytenr, size, in btrfs_add_free_space_async_trimmed()
[all …]
Dordered-data.h18 u64 bytenr; member
/fs/btrfs/tests/
Dqgroup-tests.c14 static int insert_normal_tree_ref(struct btrfs_root *root, u64 bytenr, in insert_normal_tree_ref() argument
29 ins.objectid = bytenr; in insert_normal_tree_ref()
66 static int add_tree_ref(struct btrfs_root *root, u64 bytenr, u64 num_bytes, in add_tree_ref() argument
78 key.objectid = bytenr; in add_tree_ref()
101 key.objectid = bytenr; in add_tree_ref()
117 static int remove_extent_item(struct btrfs_root *root, u64 bytenr, in remove_extent_item() argument
127 key.objectid = bytenr; in remove_extent_item()
148 static int remove_extent_ref(struct btrfs_root *root, u64 bytenr, in remove_extent_ref() argument
160 key.objectid = bytenr; in remove_extent_ref()
183 key.objectid = bytenr; in remove_extent_ref()

12