Lines Matching refs:bitmap

71 		if (!info->bitmap) {  in __btrfs_remove_free_space_cache()
578 void *bitmap) in io_ctl_add_entry() argument
588 entry->type = (bitmap) ? BTRFS_FREE_SPACE_BITMAP : in io_ctl_add_entry()
607 static int io_ctl_add_bitmap(struct btrfs_io_ctl *io_ctl, void *bitmap) in io_ctl_add_bitmap() argument
623 copy_page(io_ctl->cur, bitmap); in io_ctl_add_bitmap()
683 copy_page(entry->bitmap, io_ctl->cur); in io_ctl_read_bitmap()
844 e->bitmap = kmem_cache_zalloc( in __load_free_space_cache()
846 if (!e->bitmap) { in __load_free_space_cache()
858 kmem_cache_free(btrfs_free_space_bitmap_cachep, e->bitmap); in __load_free_space_cache()
907 if (!info->bitmap) { in copy_free_space_cache()
1102 e->bitmap); in write_cache_extent_entries()
1106 if (e->bitmap) { in write_cache_extent_entries()
1254 ret = io_ctl_add_bitmap(io_ctl, entry->bitmap); in write_bitmap_entries()
1632 if (new_entry->bitmap) { in tree_insert_offset()
1633 if (info->bitmap) { in tree_insert_offset()
1639 if (!info->bitmap) { in tree_insert_offset()
1680 if (entry->bitmap && entry->max_extent_size) in get_max_extent_size()
1732 if (entry->bitmap) in tree_search_offset()
1746 WARN_ON(!entry->bitmap); in tree_search_offset()
1749 if (entry->bitmap) { in tree_search_offset()
1758 if (!prev->bitmap && in tree_search_offset()
1785 if (entry->bitmap) { in tree_search_offset()
1790 if (!prev->bitmap && in tree_search_offset()
1807 if (entry->bitmap) { in tree_search_offset()
1829 if (!info->bitmap && !btrfs_free_space_trimmed(info)) { in unlink_free_space()
1845 ASSERT(info->bytes || info->bitmap); in link_free_space()
1852 if (!info->bitmap && !btrfs_free_space_trimmed(info)) { in link_free_space()
1865 ASSERT(info->bitmap); in relink_bitmap_entry()
1892 bitmap_clear(info->bitmap, start, count); in bitmap_clear_bits()
1900 if (start && test_bit(start - 1, info->bitmap)) in bitmap_clear_bits()
1903 if (end < BITS_PER_BITMAP && test_bit(end, info->bitmap)) in bitmap_clear_bits()
1928 bitmap_set(info->bitmap, start, count); in btrfs_bitmap_set_bits()
1940 if (start && test_bit(start - 1, info->bitmap)) in btrfs_bitmap_set_bits()
1943 if (end < BITS_PER_BITMAP && test_bit(end, info->bitmap)) in btrfs_bitmap_set_bits()
1982 for_each_set_bit_from(i, bitmap_info->bitmap, BITS_PER_BITMAP) { in search_bitmap()
1987 next_zero = find_next_zero_bit(bitmap_info->bitmap, in search_bitmap()
2085 if (entry->bitmap) { in find_free_space()
2147 kmem_cache_free(btrfs_free_space_bitmap_cachep, bitmap_info->bitmap); in free_bitmap()
2207 if (!bitmap_info->bitmap) in remove_from_bitmap()
2354 if (!entry->bitmap) { in insert_into_bitmap()
2393 if (info && info->bitmap) { in insert_into_bitmap()
2413 info->bitmap = kmem_cache_zalloc(btrfs_free_space_bitmap_cachep, in insert_into_bitmap()
2417 if (!info->bitmap) { in insert_into_bitmap()
2426 if (info->bitmap) in insert_into_bitmap()
2428 info->bitmap); in insert_into_bitmap()
2477 if (right_info && !right_info->bitmap && in try_merge_free_space()
2486 if (left_info && !left_info->bitmap && in try_merge_free_space()
2503 struct btrfs_free_space *bitmap; in steal_from_bitmap_to_end() local
2510 bitmap = tree_search_offset(ctl, bitmap_offset, 1, 0); in steal_from_bitmap_to_end()
2511 if (!bitmap) in steal_from_bitmap_to_end()
2514 i = offset_to_bit(bitmap->offset, ctl->unit, end); in steal_from_bitmap_to_end()
2515 j = find_next_zero_bit(bitmap->bitmap, BITS_PER_BITMAP, i); in steal_from_bitmap_to_end()
2522 if (!btrfs_free_space_trimmed(bitmap)) in steal_from_bitmap_to_end()
2525 bitmap_clear_bits(ctl, bitmap, end, bytes, update_stat); in steal_from_bitmap_to_end()
2527 if (!bitmap->bytes) in steal_from_bitmap_to_end()
2528 free_bitmap(ctl, bitmap); in steal_from_bitmap_to_end()
2537 struct btrfs_free_space *bitmap; in steal_from_bitmap_to_front() local
2552 bitmap = tree_search_offset(ctl, bitmap_offset, 1, 0); in steal_from_bitmap_to_front()
2553 if (!bitmap) in steal_from_bitmap_to_front()
2556 i = offset_to_bit(bitmap->offset, ctl->unit, info->offset) - 1; in steal_from_bitmap_to_front()
2559 for_each_clear_bit_from(j, bitmap->bitmap, BITS_PER_BITMAP) { in steal_from_bitmap_to_front()
2576 if (!btrfs_free_space_trimmed(bitmap)) in steal_from_bitmap_to_front()
2579 bitmap_clear_bits(ctl, bitmap, info->offset, bytes, update_stat); in steal_from_bitmap_to_front()
2581 if (!bitmap->bytes) in steal_from_bitmap_to_front()
2582 free_bitmap(ctl, bitmap); in steal_from_bitmap_to_front()
2606 ASSERT(!info->bitmap); in steal_from_bitmap()
2855 if (!info->bitmap) { in btrfs_remove_free_space()
2940 info->offset, info->bytes, str_yes_no(info->bitmap)); in btrfs_dump_free_space()
3006 if (!entry->bitmap) { in __btrfs_return_cluster_to_free_space()
3109 if (entry->bitmap) { in btrfs_find_space_for_alloc()
3252 (!entry->bitmap && entry->offset < min_start)) { in btrfs_alloc_from_cluster()
3261 if (entry->bitmap) { in btrfs_alloc_from_cluster()
3296 if (!entry->bitmap && !btrfs_free_space_trimmed(entry)) in btrfs_alloc_from_cluster()
3303 if (entry->bitmap) { in btrfs_alloc_from_cluster()
3305 entry->bitmap); in btrfs_alloc_from_cluster()
3353 for_each_set_bit_from(i, entry->bitmap, BITS_PER_BITMAP) { in btrfs_bitmap_cluster()
3354 next_zero = find_next_zero_bit(entry->bitmap, in btrfs_bitmap_cluster()
3438 while (entry->bitmap || entry->bytes < min_bytes) { in setup_cluster_no_bitmap()
3439 if (entry->bitmap && list_empty(&entry->list)) in setup_cluster_no_bitmap()
3456 if (entry->bitmap) { in setup_cluster_no_bitmap()
3487 if (entry->bitmap || entry->bytes < min_bytes) in setup_cluster_no_bitmap()
3740 while (entry->bitmap || in trim_no_bitmap()
4190 u64 offset, u64 bytes, bool bitmap) in test_add_free_space_entry() argument
4206 if (!bitmap) { in test_add_free_space_entry()
4230 info->bitmap = map; in test_add_free_space_entry()
4276 if (info->bitmap) { in test_check_exists()