Lines Matching refs:bitmap
519 void *bitmap) in io_ctl_add_entry() argument
529 entry->type = (bitmap) ? BTRFS_FREE_SPACE_BITMAP : in io_ctl_add_entry()
548 static int io_ctl_add_bitmap(struct btrfs_io_ctl *io_ctl, void *bitmap) in io_ctl_add_bitmap() argument
564 memcpy(io_ctl->cur, bitmap, PAGE_CACHE_SIZE); in io_ctl_add_bitmap()
624 memcpy(entry->bitmap, io_ctl->cur, PAGE_CACHE_SIZE); in io_ctl_read_bitmap()
650 if (e->bitmap || prev->bitmap) in merge_space_tree()
778 e->bitmap = kzalloc(PAGE_CACHE_SIZE, GFP_NOFS); in __load_free_space_cache()
779 if (!e->bitmap) { in __load_free_space_cache()
937 e->bitmap); in write_cache_extent_entries()
941 if (e->bitmap) { in write_cache_extent_entries()
1097 ret = io_ctl_add_bitmap(io_ctl, entry->bitmap); in write_bitmap_entries()
1436 struct rb_node *node, int bitmap) in tree_insert_offset() argument
1464 if (bitmap) { in tree_insert_offset()
1465 if (info->bitmap) { in tree_insert_offset()
1471 if (!info->bitmap) { in tree_insert_offset()
1521 if (entry->bitmap) in tree_search_offset()
1535 WARN_ON(!entry->bitmap); in tree_search_offset()
1538 if (entry->bitmap) { in tree_search_offset()
1547 if (!prev->bitmap && in tree_search_offset()
1574 if (entry->bitmap) { in tree_search_offset()
1579 if (!prev->bitmap && in tree_search_offset()
1592 if (entry->bitmap) { in tree_search_offset()
1629 ASSERT(info->bytes || info->bitmap); in link_free_space()
1631 &info->offset_index, (info->bitmap != NULL)); in link_free_space()
1698 bitmap_clear(info->bitmap, start, count); in __bitmap_clear_bits()
1721 bitmap_set(info->bitmap, start, count); in bitmap_set_bits()
1756 for_each_set_bit_from(i, bitmap_info->bitmap, BITS_PER_BITMAP) { in search_bitmap()
1761 next_zero = find_next_zero_bit(bitmap_info->bitmap, in search_bitmap()
1829 if (entry->bitmap) { in find_free_space()
1867 kfree(bitmap_info->bitmap); in free_bitmap()
1927 if (!bitmap_info->bitmap) in remove_from_bitmap()
2063 if (!entry->bitmap) { in insert_into_bitmap()
2101 if (info && info->bitmap) { in insert_into_bitmap()
2121 info->bitmap = kzalloc(PAGE_CACHE_SIZE, GFP_NOFS); in insert_into_bitmap()
2123 if (!info->bitmap) { in insert_into_bitmap()
2132 if (info->bitmap) in insert_into_bitmap()
2133 kfree(info->bitmap); in insert_into_bitmap()
2161 if (right_info && !right_info->bitmap) { in try_merge_free_space()
2171 if (left_info && !left_info->bitmap && in try_merge_free_space()
2190 struct btrfs_free_space *bitmap; in steal_from_bitmap_to_end() local
2197 bitmap = tree_search_offset(ctl, bitmap_offset, 1, 0); in steal_from_bitmap_to_end()
2198 if (!bitmap) in steal_from_bitmap_to_end()
2201 i = offset_to_bit(bitmap->offset, ctl->unit, end); in steal_from_bitmap_to_end()
2202 j = find_next_zero_bit(bitmap->bitmap, BITS_PER_BITMAP, i); in steal_from_bitmap_to_end()
2209 bitmap_clear_bits(ctl, bitmap, end, bytes); in steal_from_bitmap_to_end()
2211 __bitmap_clear_bits(ctl, bitmap, end, bytes); in steal_from_bitmap_to_end()
2213 if (!bitmap->bytes) in steal_from_bitmap_to_end()
2214 free_bitmap(ctl, bitmap); in steal_from_bitmap_to_end()
2223 struct btrfs_free_space *bitmap; in steal_from_bitmap_to_front() local
2238 bitmap = tree_search_offset(ctl, bitmap_offset, 1, 0); in steal_from_bitmap_to_front()
2239 if (!bitmap) in steal_from_bitmap_to_front()
2242 i = offset_to_bit(bitmap->offset, ctl->unit, info->offset) - 1; in steal_from_bitmap_to_front()
2245 for_each_clear_bit_from(j, bitmap->bitmap, BITS_PER_BITMAP) { in steal_from_bitmap_to_front()
2262 bitmap_clear_bits(ctl, bitmap, info->offset, bytes); in steal_from_bitmap_to_front()
2264 __bitmap_clear_bits(ctl, bitmap, info->offset, bytes); in steal_from_bitmap_to_front()
2266 if (!bitmap->bytes) in steal_from_bitmap_to_front()
2267 free_bitmap(ctl, bitmap); in steal_from_bitmap_to_front()
2291 ASSERT(!info->bitmap); in steal_from_bitmap()
2397 if (!info->bitmap) { in btrfs_remove_free_space()
2467 (info->bitmap) ? "yes" : "no"); in btrfs_dump_free_space()
2521 bool bitmap; in __btrfs_return_cluster_to_free_space() local
2528 bitmap = (entry->bitmap != NULL); in __btrfs_return_cluster_to_free_space()
2529 if (!bitmap) { in __btrfs_return_cluster_to_free_space()
2534 entry->offset, &entry->offset_index, bitmap); in __btrfs_return_cluster_to_free_space()
2552 if (!info->bitmap) { in __btrfs_remove_free_space_cache_locked()
2610 if (entry->bitmap) { in btrfs_find_space_for_alloc()
2738 (!entry->bitmap && entry->offset < min_start)) { in btrfs_alloc_from_cluster()
2747 if (entry->bitmap) { in btrfs_alloc_from_cluster()
2783 if (entry->bitmap) { in btrfs_alloc_from_cluster()
2784 kfree(entry->bitmap); in btrfs_alloc_from_cluster()
2827 for_each_set_bit_from(i, entry->bitmap, BITS_PER_BITMAP) { in btrfs_bitmap_cluster()
2828 next_zero = find_next_zero_bit(entry->bitmap, in btrfs_bitmap_cluster()
2900 while (entry->bitmap || entry->bytes < min_bytes) { in setup_cluster_no_bitmap()
2901 if (entry->bitmap && list_empty(&entry->list)) in setup_cluster_no_bitmap()
2918 if (entry->bitmap) { in setup_cluster_no_bitmap()
2949 if (entry->bitmap || entry->bytes < min_bytes) in setup_cluster_no_bitmap()
3187 while (entry->bitmap) { in trim_no_bitmap()
3411 if (!entry->bitmap) { in btrfs_find_ino_for_alloc()
3563 u64 offset, u64 bytes, bool bitmap) in test_add_free_space_entry() argument
3578 if (!bitmap) { in test_add_free_space_entry()
3602 info->bitmap = map; in test_add_free_space_entry()
3647 if (info->bitmap) { in test_check_exists()