Lines Matching refs:em_tree
1374 struct extent_map_tree *em_tree; in find_next_chunk() local
1379 em_tree = &fs_info->mapping_tree.map_tree; in find_next_chunk()
1380 read_lock(&em_tree->lock); in find_next_chunk()
1381 n = rb_last(&em_tree->map); in find_next_chunk()
1386 read_unlock(&em_tree->lock); in find_next_chunk()
2584 struct extent_map_tree *em_tree; in btrfs_remove_chunk() local
2594 em_tree = &root->fs_info->mapping_tree.map_tree; in btrfs_remove_chunk()
2596 read_lock(&em_tree->lock); in btrfs_remove_chunk()
2597 em = lookup_extent_mapping(em_tree, chunk_offset, 1); in btrfs_remove_chunk()
2598 read_unlock(&em_tree->lock); in btrfs_remove_chunk()
4225 struct extent_map_tree *em_tree; in __btrfs_alloc_chunk() local
4462 em_tree = &extent_root->fs_info->mapping_tree.map_tree; in __btrfs_alloc_chunk()
4463 write_lock(&em_tree->lock); in __btrfs_alloc_chunk()
4464 ret = add_extent_mapping(em_tree, em, 0); in __btrfs_alloc_chunk()
4469 write_unlock(&em_tree->lock); in __btrfs_alloc_chunk()
4498 write_lock(&em_tree->lock); in __btrfs_alloc_chunk()
4499 remove_extent_mapping(em_tree, em); in __btrfs_alloc_chunk()
4500 write_unlock(&em_tree->lock); in __btrfs_alloc_chunk()
4522 struct extent_map_tree *em_tree; in btrfs_finish_chunk_alloc() local
4531 em_tree = &extent_root->fs_info->mapping_tree.map_tree; in btrfs_finish_chunk_alloc()
4532 read_lock(&em_tree->lock); in btrfs_finish_chunk_alloc()
4533 em = lookup_extent_mapping(em_tree, chunk_offset, chunk_size); in btrfs_finish_chunk_alloc()
4534 read_unlock(&em_tree->lock); in btrfs_finish_chunk_alloc()
4746 struct extent_map_tree *em_tree = &map_tree->map_tree; in btrfs_num_copies() local
4749 read_lock(&em_tree->lock); in btrfs_num_copies()
4750 em = lookup_extent_mapping(em_tree, logical, len); in btrfs_num_copies()
4751 read_unlock(&em_tree->lock); in btrfs_num_copies()
4799 struct extent_map_tree *em_tree = &map_tree->map_tree; in btrfs_full_stripe_len() local
4802 read_lock(&em_tree->lock); in btrfs_full_stripe_len()
4803 em = lookup_extent_mapping(em_tree, logical, len); in btrfs_full_stripe_len()
4804 read_unlock(&em_tree->lock); in btrfs_full_stripe_len()
4820 struct extent_map_tree *em_tree = &map_tree->map_tree; in btrfs_is_parity_mirror() local
4823 read_lock(&em_tree->lock); in btrfs_is_parity_mirror()
4824 em = lookup_extent_mapping(em_tree, logical, len); in btrfs_is_parity_mirror()
4825 read_unlock(&em_tree->lock); in btrfs_is_parity_mirror()
4950 struct extent_map_tree *em_tree = &map_tree->map_tree; in __btrfs_map_block() local
4972 read_lock(&em_tree->lock); in __btrfs_map_block()
4973 em = lookup_extent_mapping(em_tree, logical, *length); in __btrfs_map_block()
4974 read_unlock(&em_tree->lock); in __btrfs_map_block()
5506 struct extent_map_tree *em_tree = &map_tree->map_tree; in btrfs_rmap_block() local
5516 read_lock(&em_tree->lock); in btrfs_rmap_block()
5517 em = lookup_extent_mapping(em_tree, chunk_start, 1); in btrfs_rmap_block()
5518 read_unlock(&em_tree->lock); in btrfs_rmap_block()