Home
last modified time | relevance | path

Searched refs:bytenr (Results 1 – 25 of 32) 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.c284 u64 bytenr; in htree_insert() local
288 bytenr = ins->bytenr; in htree_insert()
294 if (bytenr < entry->bytenr) { in htree_insert()
296 } else if (bytenr > entry->bytenr) { in htree_insert()
361 struct btrfs_delayed_ref_root *dr, u64 bytenr, in find_ref_head() argument
373 if (bytenr < entry->bytenr) in find_ref_head()
375 else if (bytenr > entry->bytenr) in find_ref_head()
381 if (bytenr > entry->bytenr) { in find_ref_head()
569 delayed_refs->run_delayed_start = head->bytenr + in btrfs_select_ref_head()
751 u64 bytenr, u64 num_bytes, u64 ref_root, in init_delayed_ref_head() argument
[all …]
Dfile-item.c175 u64 bytenr, int cow) in btrfs_lookup_csum() argument
188 file_key.offset = bytenr; in btrfs_lookup_csum()
203 csum_offset = (bytenr - found_key.offset) >> in btrfs_lookup_csum()
484 sums->bytenr = start; in btrfs_lookup_csums_range()
560 sums->bytenr = (u64)bio->bi_iter.bi_sector << 9; in btrfs_csum_one_bio()
612 sums->bytenr = ((u64)bio->bi_iter.bi_sector << 9) in btrfs_csum_one_bio()
650 u64 bytenr, u64 len) in truncate_one_csum() argument
655 u64 end_byte = bytenr + len; in truncate_one_csum()
663 if (key->offset < bytenr && csum_end <= end_byte) { in truncate_one_csum()
670 u32 new_size = (bytenr - key->offset) >> blocksize_bits; in truncate_one_csum()
[all …]
Dextent-tree.c114 struct btrfs_fs_info *fs_info, u64 bytenr, in btrfs_lookup_extent_info() argument
147 key.objectid = bytenr; in btrfs_lookup_extent_info()
163 if (key.objectid == bytenr && in btrfs_lookup_extent_info()
201 head = btrfs_find_delayed_ref_head(delayed_refs, bytenr); in btrfs_lookup_extent_info()
440 u64 bytenr, u64 parent, in lookup_extent_data_ref() argument
453 key.objectid = bytenr; in lookup_extent_data_ref()
492 if (key.objectid != bytenr || in lookup_extent_data_ref()
516 u64 bytenr, u64 parent, in insert_extent_data_ref() argument
527 key.objectid = bytenr; in insert_extent_data_ref()
683 u64 bytenr, u64 parent, in lookup_tree_block_ref() argument
[all …]
Dbackref.h44 struct btrfs_fs_info *fs_info, u64 bytenr,
48 struct btrfs_fs_info *fs_info, u64 bytenr,
64 int btrfs_check_shared(struct btrfs_root *root, u64 inum, u64 bytenr,
87 u64 bytenr; member
130 int btrfs_backref_iter_start(struct btrfs_backref_iter *iter, u64 bytenr);
145 iter->bytenr = 0; in btrfs_backref_iter_release()
166 u64 bytenr; member
274 struct btrfs_backref_cache *cache, u64 bytenr, int level);
361 u64 bytenr, int errno) in btrfs_backref_panic() argument
365 bytenr); in btrfs_backref_panic()
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()
352 u64 bytenr, u64 num_bytes,
360 u64 bytenr);
Dbackref.c393 static int is_shared_data_backref(struct preftrees *preftrees, u64 bytenr) in is_shared_data_backref() argument
401 target.parent = bytenr; in is_shared_data_backref()
883 node->bytenr, count, sc, in add_delayed_refs()
894 ref->parent, node->bytenr, count, in add_delayed_refs()
926 &key, 0, node->bytenr, count, sc, in add_delayed_refs()
937 node->bytenr, count, sc, in add_delayed_refs()
964 struct btrfs_path *path, u64 bytenr, in add_inline_refs() argument
1026 bytenr, 1, NULL, GFP_NOFS); in add_inline_refs()
1036 bytenr, count, sc, GFP_NOFS); in add_inline_refs()
1042 bytenr, 1, NULL, GFP_NOFS); in add_inline_refs()
[all …]
Drelocation.c83 u64 bytenr; member
99 u64 bytenr; member
162 in_range(node->bytenr, rc->block_group->start, in mark_block_processed()
165 set_extent_bits(&rc->processed_blocks, node->bytenr, in mark_block_processed()
166 node->bytenr + blocksize - 1, EXTENT_DIRTY); in mark_block_processed()
227 struct btrfs_backref_node *node, u64 bytenr) in update_backref_node() argument
231 node->bytenr = bytenr; in update_backref_node()
232 rb_node = rb_simple_insert(&cache->rb_root, node->bytenr, &node->rb_node); in update_backref_node()
234 btrfs_backref_panic(cache->fs_info, bytenr, -EEXIST); in update_backref_node()
280 if (node->bytenr == node->new_bytenr) in update_backref_cache()
[all …]
Dblock-group.h224 struct btrfs_fs_info *info, u64 bytenr);
226 struct btrfs_fs_info *info, u64 bytenr);
234 bool btrfs_inc_nocow_writers(struct btrfs_fs_info *fs_info, u64 bytenr);
235 void btrfs_dec_nocow_writers(struct btrfs_fs_info *fs_info, u64 bytenr);
265 u64 bytenr, u64 num_bytes, int alloc);
Dcheck-integrity.c311 static int btrfsic_map_block(struct btrfsic_state *state, u64 bytenr, u32 len,
370 u64 bytenr,
1503 static int btrfsic_map_block(struct btrfsic_state *state, u64 bytenr, u32 len, in btrfsic_map_block() argument
1515 bytenr, &length, &multi, mirror_num); in btrfsic_map_block()
1537 block_ctx_out->start = bytenr; in btrfsic_map_block()
1760 u64 bytenr = 0; in btrfsic_process_written_block() local
1764 bytenr = btrfs_super_bytenr((struct btrfs_super_block *) in btrfsic_process_written_block()
1788 bytenr = btrfs_stack_header_bytenr( in btrfsic_process_written_block()
1791 btrfsic_cmp_log_and_dev_bytenr(state, bytenr, in btrfsic_process_written_block()
1796 if (block->logical_bytenr != bytenr && in btrfsic_process_written_block()
[all …]
Dfree-space-cache.h115 u64 bytenr, u64 size,
118 u64 bytenr, u64 size);
120 u64 bytenr, u64 size);
122 u64 bytenr, u64 size);
Ddisk-io.h45 struct extent_buffer *read_tree_block(struct btrfs_fs_info *fs_info, u64 bytenr,
48 void readahead_tree_block(struct btrfs_fs_info *fs_info, u64 bytenr);
51 u64 bytenr);
Dblock-group.c202 struct btrfs_fs_info *info, u64 bytenr, int contains) in block_group_cache_tree_search() argument
216 if (bytenr < start) { in block_group_cache_tree_search()
220 } else if (bytenr > start) { in block_group_cache_tree_search()
221 if (contains && bytenr <= end) { in block_group_cache_tree_search()
233 if (bytenr == 0 && info->first_logical_byte > ret->start) in block_group_cache_tree_search()
245 struct btrfs_fs_info *info, u64 bytenr) in btrfs_lookup_first_block_group() argument
247 return block_group_cache_tree_search(info, bytenr, 0); in btrfs_lookup_first_block_group()
254 struct btrfs_fs_info *info, u64 bytenr) in btrfs_lookup_block_group() argument
256 return block_group_cache_tree_search(info, bytenr, 1); in btrfs_lookup_block_group()
286 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,
Ddisk-io.c950 void readahead_tree_block(struct btrfs_fs_info *fs_info, u64 bytenr) in readahead_tree_block() argument
955 buf = btrfs_find_create_tree_block(fs_info, bytenr); in readahead_tree_block()
968 u64 bytenr) in btrfs_find_create_tree_block() argument
971 return alloc_test_extent_buffer(fs_info, bytenr); in btrfs_find_create_tree_block()
972 return alloc_extent_buffer(fs_info, bytenr); in btrfs_find_create_tree_block()
983 struct extent_buffer *read_tree_block(struct btrfs_fs_info *fs_info, u64 bytenr, in read_tree_block() argument
990 buf = btrfs_find_create_tree_block(fs_info, bytenr); in read_tree_block()
2287 u64 bytenr = btrfs_super_log_root(disk_super); in btrfs_replay_log() local
2300 log_tree_root->node = read_tree_block(fs_info, bytenr, in btrfs_replay_log()
3533 u64 bytenr; in btrfs_read_dev_one_super() local
[all …]
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
1798 ret = btrfs_find_all_roots(NULL, fs_info, bytenr, 0, &old_root, false); in btrfs_qgroup_trace_extent_post()
1818 int btrfs_qgroup_trace_extent(struct btrfs_trans_handle *trans, u64 bytenr, in btrfs_qgroup_trace_extent() argument
1827 || bytenr == 0 || num_bytes == 0) in btrfs_qgroup_trace_extent()
1834 record->bytenr = bytenr; in btrfs_qgroup_trace_extent()
1856 u64 bytenr, num_bytes; in btrfs_qgroup_trace_leaf_items() local
1875 bytenr = btrfs_file_extent_disk_bytenr(eb, fi); in btrfs_qgroup_trace_leaf_items()
[all …]
Dtree-checker.c1168 u64 bytenr; in extent_err() local
1172 bytenr = key.objectid; in extent_err()
1187 eb->start, slot, bytenr, len, &vaf); in extent_err()
1763 u64 bytenr; in btrfs_check_node() local
1782 bytenr = btrfs_node_blockptr(node, slot); in btrfs_check_node()
1786 if (!bytenr) { in btrfs_check_node()
1792 if (!IS_ALIGNED(bytenr, fs_info->sectorsize)) { in btrfs_check_node()
1795 bytenr, fs_info->sectorsize); in btrfs_check_node()
Dctree.h166 __le64 bytenr; /* which block this node is supposed to live in */ member
233 __le64 bytenr; /* this block number */ member
2034 BTRFS_SETGET_HEADER_FUNCS(header_bytenr, struct btrfs_header, bytenr, 64);
2046 BTRFS_SETGET_STACK_FUNCS(stack_header_bytenr, struct btrfs_header, bytenr, 64);
2089 BTRFS_SETGET_FUNCS(disk_root_bytenr, struct btrfs_root_item, bytenr, 64);
2094 BTRFS_SETGET_STACK_FUNCS(root_bytenr, struct btrfs_root_item, bytenr, 64);
2259 BTRFS_SETGET_STACK_FUNCS(super_bytenr, struct btrfs_super_block, bytenr, 64);
2559 struct btrfs_fs_info *fs_info, u64 bytenr,
2561 int btrfs_pin_extent(struct btrfs_trans_handle *trans, u64 bytenr, u64 num,
2564 u64 bytenr, u64 num_bytes);
[all …]
Dreada.c100 u64 bytenr; in __readahead_hook() local
144 bytenr = btrfs_node_blockptr(eb, i); in __readahead_hook()
168 reada_add_block(rc, bytenr, &next_key, n_gen); in __readahead_hook()
647 static int reada_tree_block_flagged(struct btrfs_fs_info *fs_info, u64 bytenr, in reada_tree_block_flagged() argument
653 buf = btrfs_find_create_tree_block(fs_info, bytenr); in reada_tree_block_flagged()
Dscrub.c393 static u64 get_full_stripe_logical(struct btrfs_block_group *cache, u64 bytenr) in get_full_stripe_logical() argument
407 ret = div64_u64(bytenr - cache->start, cache->full_stripe_len) * in get_full_stripe_logical()
423 static int lock_full_stripe(struct btrfs_fs_info *fs_info, u64 bytenr, in lock_full_stripe() argument
433 bg_cache = btrfs_lookup_block_group(fs_info, bytenr); in lock_full_stripe()
444 fstripe_start = get_full_stripe_logical(bg_cache, bytenr); in lock_full_stripe()
470 static int unlock_full_stripe(struct btrfs_fs_info *fs_info, u64 bytenr, in unlock_full_stripe() argument
484 bg_cache = btrfs_lookup_block_group(fs_info, bytenr); in unlock_full_stripe()
493 fstripe_start = get_full_stripe_logical(bg_cache, bytenr); in unlock_full_stripe()
2376 if (sum->bytenr > logical) in scrub_find_csum()
2378 if (sum->bytenr + sum->len > logical) in scrub_find_csum()
[all …]
Dordered-data.h18 u64 bytenr; member
Dfile.c1030 u64 objectid, u64 bytenr, u64 orig_offset, in extent_mergeable() argument
1046 btrfs_file_extent_disk_bytenr(leaf, fi) != bytenr || in extent_mergeable()
1080 u64 bytenr; in btrfs_mark_extent_written() local
1131 bytenr = btrfs_file_extent_disk_bytenr(leaf, fi); in btrfs_mark_extent_written()
1140 ino, bytenr, orig_offset, in btrfs_mark_extent_written()
1167 ino, bytenr, orig_offset, in btrfs_mark_extent_written()
1223 btrfs_init_generic_ref(&ref, BTRFS_ADD_DELAYED_REF, bytenr, in btrfs_mark_extent_written()
1249 btrfs_init_generic_ref(&ref, BTRFS_DROP_DELAYED_REF, bytenr, in btrfs_mark_extent_written()
1253 ino, bytenr, orig_offset, in btrfs_mark_extent_written()
1271 ino, bytenr, orig_offset, in btrfs_mark_extent_written()
Dordered-data.c882 if (disk_bytenr >= ordered_sum->bytenr && in btrfs_find_ordered_sum()
883 disk_bytenr < ordered_sum->bytenr + ordered_sum->len) { in btrfs_find_ordered_sum()
884 i = (disk_bytenr - ordered_sum->bytenr) >> blocksize_bits; in btrfs_find_ordered_sum()
/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()
67 static int add_tree_ref(struct btrfs_root *root, u64 bytenr, u64 num_bytes, in add_tree_ref() argument
79 key.objectid = bytenr; in add_tree_ref()
103 key.objectid = bytenr; in add_tree_ref()
119 static int remove_extent_item(struct btrfs_root *root, u64 bytenr, in remove_extent_item() argument
129 key.objectid = bytenr; in remove_extent_item()
151 static int remove_extent_ref(struct btrfs_root *root, u64 bytenr, in remove_extent_ref() argument
163 key.objectid = bytenr; in remove_extent_ref()
187 key.objectid = bytenr; in remove_extent_ref()

12