/fs/btrfs/tests/ |
D | extent-map-tests.c | 13 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 …]
|
/fs/btrfs/ |
D | extent_map.c | 581 static noinline int merge_extent_mapping(struct extent_map_tree *em_tree, in merge_extent_mapping() argument 614 return add_extent_mapping(em_tree, em, 0); in merge_extent_mapping() 639 struct extent_map_tree *em_tree, in btrfs_add_extent_mapping() argument 645 ret = add_extent_mapping(em_tree, em, 0); in btrfs_add_extent_mapping() 655 existing = search_extent_mapping(em_tree, start, len); in btrfs_add_extent_mapping() 676 ret = merge_extent_mapping(em_tree, existing, in btrfs_add_extent_mapping() 737 struct extent_map_tree *em_tree = &inode->extent_tree; in btrfs_drop_extent_map_range() local 743 drop_all_extent_maps_fast(em_tree); in btrfs_drop_extent_map_range() 763 write_lock(&em_tree->lock); in btrfs_drop_extent_map_range() 764 em = lookup_extent_mapping(em_tree, start, len); in btrfs_drop_extent_map_range() [all …]
|
D | compression.c | 525 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()
|
D | block-group.c | 1126 struct extent_map_tree *em_tree; in btrfs_remove_block_group() local 1128 em_tree = &fs_info->mapping_tree; in btrfs_remove_block_group() 1129 write_lock(&em_tree->lock); in btrfs_remove_block_group() 1130 remove_extent_mapping(em_tree, em); in btrfs_remove_block_group() 1131 write_unlock(&em_tree->lock); in btrfs_remove_block_group() 1149 struct extent_map_tree *em_tree = &fs_info->mapping_tree; in btrfs_start_trans_remove_block_group() local 1154 read_lock(&em_tree->lock); in btrfs_start_trans_remove_block_group() 1155 em = lookup_extent_mapping(em_tree, chunk_offset, 1); in btrfs_start_trans_remove_block_group() 1156 read_unlock(&em_tree->lock); in btrfs_start_trans_remove_block_group() 1768 struct extent_map_tree *em_tree; in read_bg_from_eb() local [all …]
|
D | zoned.c | 1276 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()
|
D | volumes.c | 1804 struct extent_map_tree *em_tree; in find_next_chunk() local 1809 em_tree = &fs_info->mapping_tree; in find_next_chunk() 1810 read_lock(&em_tree->lock); in find_next_chunk() 1811 n = rb_last(&em_tree->map.rb_root); in find_next_chunk() 1816 read_unlock(&em_tree->lock); in find_next_chunk() 3068 struct extent_map_tree *em_tree; in btrfs_get_chunk_map() local 3071 em_tree = &fs_info->mapping_tree; in btrfs_get_chunk_map() 3072 read_lock(&em_tree->lock); in btrfs_get_chunk_map() 3073 em = lookup_extent_mapping(em_tree, logical, length); in btrfs_get_chunk_map() 3074 read_unlock(&em_tree->lock); in btrfs_get_chunk_map() [all …]
|
D | extent_map.h | 109 struct extent_map_tree *em_tree,
|
D | dev-replace.c | 828 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()
|
D | file.c | 3227 struct extent_map_tree *em_tree = &inode->extent_tree; in find_delalloc_subrange() local 3261 read_lock(&em_tree->lock); in find_delalloc_subrange() 3262 em = lookup_extent_mapping(em_tree, start, len); in find_delalloc_subrange() 3264 read_unlock(&em_tree->lock); in find_delalloc_subrange() 3279 next_em = btrfs_next_extent_map(em_tree, em); in find_delalloc_subrange() 3287 read_unlock(&em_tree->lock); in find_delalloc_subrange() 3296 read_unlock(&em_tree->lock); in find_delalloc_subrange()
|
D | inode.c | 1107 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 …]
|
D | ioctl.c | 1193 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree; in defrag_lookup_extent() local 1202 read_lock(&em_tree->lock); in defrag_lookup_extent() 1203 em = lookup_extent_mapping(em_tree, start, sectorsize); in defrag_lookup_extent() 1204 read_unlock(&em_tree->lock); in defrag_lookup_extent()
|
D | tree-log.c | 6368 struct extent_map_tree *em_tree = &inode->extent_tree; in btrfs_log_inode() local 6603 write_lock(&em_tree->lock); in btrfs_log_inode() 6604 list_for_each_entry_safe(em, n, &em_tree->modified_extents, list) in btrfs_log_inode() 6606 write_unlock(&em_tree->lock); in btrfs_log_inode()
|