Home
last modified time | relevance | path

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

/Linux-v6.1/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-v6.1/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.c1276 struct extent_map_tree *em_tree = &fs_info->mapping_tree; in btrfs_load_block_group_zone_info() local
1304 read_lock(&em_tree->lock); in btrfs_load_block_group_zone_info()
1305 em = lookup_extent_mapping(em_tree, logical, length); in btrfs_load_block_group_zone_info()
1306 read_unlock(&em_tree->lock); in btrfs_load_block_group_zone_info()
1680 struct extent_map_tree *em_tree; in btrfs_rewrite_logical_zoned() local
1704 em_tree = &inode->extent_tree; in btrfs_rewrite_logical_zoned()
1705 write_lock(&em_tree->lock); in btrfs_rewrite_logical_zoned()
1706 em = search_extent_mapping(em_tree, ordered->file_offset, in btrfs_rewrite_logical_zoned()
1710 write_unlock(&em_tree->lock); in btrfs_rewrite_logical_zoned()
Dvolumes.c1760 struct extent_map_tree *em_tree; in find_next_chunk() local
1765 em_tree = &fs_info->mapping_tree; in find_next_chunk()
1766 read_lock(&em_tree->lock); in find_next_chunk()
1767 n = rb_last(&em_tree->map.rb_root); in find_next_chunk()
1772 read_unlock(&em_tree->lock); in find_next_chunk()
3024 struct extent_map_tree *em_tree; in btrfs_get_chunk_map() local
3027 em_tree = &fs_info->mapping_tree; in btrfs_get_chunk_map()
3028 read_lock(&em_tree->lock); in btrfs_get_chunk_map()
3029 em = lookup_extent_mapping(em_tree, logical, length); in btrfs_get_chunk_map()
3030 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.c3532 struct extent_map_tree *em_tree = &inode->extent_tree; in find_delalloc_subrange() local
3566 read_lock(&em_tree->lock); in find_delalloc_subrange()
3567 em = lookup_extent_mapping(em_tree, start, len); in find_delalloc_subrange()
3568 read_unlock(&em_tree->lock); in find_delalloc_subrange()
3581 read_lock(&em_tree->lock); in find_delalloc_subrange()
3582 next_em = lookup_extent_mapping(em_tree, em_end, len - em_end); in find_delalloc_subrange()
3583 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.c6364 struct extent_map_tree *em_tree = &inode->extent_tree; in btrfs_log_inode() local
6599 write_lock(&em_tree->lock); in btrfs_log_inode()
6600 list_for_each_entry_safe(em, n, &em_tree->modified_extents, list) in btrfs_log_inode()
6602 write_unlock(&em_tree->lock); in btrfs_log_inode()