Home
last modified time | relevance | path

Searched refs:em_tree (Results 1 – 12 of 12) sorted by relevance

/linux-6.1.9/fs/btrfs/tests/
Dextent-map-tests.c13 static void free_extent_map_tree(struct extent_map_tree *em_tree) in free_extent_map_tree() argument
18 write_lock(&em_tree->lock); in free_extent_map_tree()
19 while (!RB_EMPTY_ROOT(&em_tree->map.rb_root)) { in free_extent_map_tree()
20 node = rb_first_cached(&em_tree->map); in free_extent_map_tree()
22 remove_extent_mapping(em_tree, em); in free_extent_map_tree()
36 write_unlock(&em_tree->lock); in free_extent_map_tree()
56 struct extent_map_tree *em_tree) in test_case_1() argument
74 write_lock(&em_tree->lock); in test_case_1()
75 ret = add_extent_mapping(em_tree, em, 0); in test_case_1()
76 write_unlock(&em_tree->lock); in test_case_1()
[all …]
/linux-6.1.9/fs/btrfs/
Dextent_map.c552 static noinline int merge_extent_mapping(struct extent_map_tree *em_tree, in merge_extent_mapping() argument
585 return add_extent_mapping(em_tree, em, 0); in merge_extent_mapping()
610 struct extent_map_tree *em_tree, in btrfs_add_extent_mapping() argument
616 ret = add_extent_mapping(em_tree, em, 0); in btrfs_add_extent_mapping()
626 existing = search_extent_mapping(em_tree, start, len); in btrfs_add_extent_mapping()
647 ret = merge_extent_mapping(em_tree, existing, in btrfs_add_extent_mapping()
708 struct extent_map_tree *em_tree = &inode->extent_tree; in btrfs_drop_extent_map_range() local
714 drop_all_extent_maps_fast(em_tree); in btrfs_drop_extent_map_range()
734 write_lock(&em_tree->lock); in btrfs_drop_extent_map_range()
735 em = lookup_extent_mapping(em_tree, start, len); in btrfs_drop_extent_map_range()
[all …]
Dcompression.c525 struct extent_map_tree *em_tree; in add_ra_bio_pages() local
529 em_tree = &BTRFS_I(inode)->extent_tree; in add_ra_bio_pages()
598 read_lock(&em_tree->lock); in add_ra_bio_pages()
599 em = lookup_extent_mapping(em_tree, cur, page_end + 1 - cur); in add_ra_bio_pages()
600 read_unlock(&em_tree->lock); in add_ra_bio_pages()
664 struct extent_map_tree *em_tree; in btrfs_submit_compressed_read() local
681 em_tree = &BTRFS_I(inode)->extent_tree; in btrfs_submit_compressed_read()
687 read_lock(&em_tree->lock); in btrfs_submit_compressed_read()
688 em = lookup_extent_mapping(em_tree, file_offset, fs_info->sectorsize); in btrfs_submit_compressed_read()
689 read_unlock(&em_tree->lock); in btrfs_submit_compressed_read()
Dblock-group.c1094 struct extent_map_tree *em_tree; in btrfs_remove_block_group() local
1096 em_tree = &fs_info->mapping_tree; in btrfs_remove_block_group()
1097 write_lock(&em_tree->lock); in btrfs_remove_block_group()
1098 remove_extent_mapping(em_tree, em); in btrfs_remove_block_group()
1099 write_unlock(&em_tree->lock); in btrfs_remove_block_group()
1117 struct extent_map_tree *em_tree = &fs_info->mapping_tree; in btrfs_start_trans_remove_block_group() local
1122 read_lock(&em_tree->lock); in btrfs_start_trans_remove_block_group()
1123 em = lookup_extent_mapping(em_tree, chunk_offset, 1); in btrfs_start_trans_remove_block_group()
1124 read_unlock(&em_tree->lock); in btrfs_start_trans_remove_block_group()
1663 struct extent_map_tree *em_tree; in read_bg_from_eb() local
[all …]
Dextent_map.h107 struct extent_map_tree *em_tree,
Dzoned.c1278 struct extent_map_tree *em_tree = &fs_info->mapping_tree; in btrfs_load_block_group_zone_info() local
1306 read_lock(&em_tree->lock); in btrfs_load_block_group_zone_info()
1307 em = lookup_extent_mapping(em_tree, logical, length); in btrfs_load_block_group_zone_info()
1308 read_unlock(&em_tree->lock); in btrfs_load_block_group_zone_info()
1682 struct extent_map_tree *em_tree; in btrfs_rewrite_logical_zoned() local
1706 em_tree = &inode->extent_tree; in btrfs_rewrite_logical_zoned()
1707 write_lock(&em_tree->lock); in btrfs_rewrite_logical_zoned()
1708 em = search_extent_mapping(em_tree, ordered->file_offset, in btrfs_rewrite_logical_zoned()
1712 write_unlock(&em_tree->lock); in btrfs_rewrite_logical_zoned()
Dvolumes.c1769 struct extent_map_tree *em_tree; in find_next_chunk() local
1774 em_tree = &fs_info->mapping_tree; in find_next_chunk()
1775 read_lock(&em_tree->lock); in find_next_chunk()
1776 n = rb_last(&em_tree->map.rb_root); in find_next_chunk()
1781 read_unlock(&em_tree->lock); in find_next_chunk()
3033 struct extent_map_tree *em_tree; in btrfs_get_chunk_map() local
3036 em_tree = &fs_info->mapping_tree; in btrfs_get_chunk_map()
3037 read_lock(&em_tree->lock); in btrfs_get_chunk_map()
3038 em = lookup_extent_mapping(em_tree, logical, length); in btrfs_get_chunk_map()
3039 read_unlock(&em_tree->lock); in btrfs_get_chunk_map()
[all …]
Ddev-replace.c828 struct extent_map_tree *em_tree = &fs_info->mapping_tree; in btrfs_dev_replace_update_device_in_mapping_tree() local
834 write_lock(&em_tree->lock); in btrfs_dev_replace_update_device_in_mapping_tree()
836 em = lookup_extent_mapping(em_tree, start, (u64)-1); in btrfs_dev_replace_update_device_in_mapping_tree()
846 write_unlock(&em_tree->lock); in btrfs_dev_replace_update_device_in_mapping_tree()
Dinode.c1107 struct extent_map_tree *em_tree = &inode->extent_tree; in get_extent_allocation_hint() local
1111 read_lock(&em_tree->lock); in get_extent_allocation_hint()
1112 em = search_extent_mapping(em_tree, start, num_bytes); in get_extent_allocation_hint()
1121 em = search_extent_mapping(em_tree, 0, 0); in get_extent_allocation_hint()
1131 read_unlock(&em_tree->lock); in get_extent_allocation_hint()
2530 struct extent_map_tree *em_tree = &inode->extent_tree; in split_zoned_em() local
2555 write_lock(&em_tree->lock); in split_zoned_em()
2556 em = lookup_extent_mapping(em_tree, start, len); in split_zoned_em()
2584 replace_extent_mapping(em_tree, em, split_pre, 1); in split_zoned_em()
2604 add_extent_mapping(em_tree, split_mid, 1); in split_zoned_em()
[all …]
Dfile.c3538 struct extent_map_tree *em_tree = &inode->extent_tree; in find_delalloc_subrange() local
3572 read_lock(&em_tree->lock); in find_delalloc_subrange()
3573 em = lookup_extent_mapping(em_tree, start, len); in find_delalloc_subrange()
3574 read_unlock(&em_tree->lock); in find_delalloc_subrange()
3587 read_lock(&em_tree->lock); in find_delalloc_subrange()
3588 next_em = lookup_extent_mapping(em_tree, em_end, len - em_end); in find_delalloc_subrange()
3589 read_unlock(&em_tree->lock); in find_delalloc_subrange()
Dioctl.c1188 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree; in defrag_lookup_extent() local
1197 read_lock(&em_tree->lock); in defrag_lookup_extent()
1198 em = lookup_extent_mapping(em_tree, start, sectorsize); in defrag_lookup_extent()
1199 read_unlock(&em_tree->lock); in defrag_lookup_extent()
Dtree-log.c6379 struct extent_map_tree *em_tree = &inode->extent_tree; in btrfs_log_inode() local
6614 write_lock(&em_tree->lock); in btrfs_log_inode()
6615 list_for_each_entry_safe(em, n, &em_tree->modified_extents, list) in btrfs_log_inode()
6617 write_unlock(&em_tree->lock); in btrfs_log_inode()