Lines Matching defs:ctl

36 static int count_bitmap_extents(struct btrfs_free_space_ctl *ctl,
38 static int link_free_space(struct btrfs_free_space_ctl *ctl,
40 static void unlink_free_space(struct btrfs_free_space_ctl *ctl,
637 static void merge_space_tree(struct btrfs_free_space_ctl *ctl)
643 spin_lock(&ctl->tree_lock);
644 for (n = rb_first(&ctl->free_space_offset); n; n = rb_next(n)) {
651 unlink_free_space(ctl, prev);
652 unlink_free_space(ctl, e);
655 link_free_space(ctl, prev);
657 spin_unlock(&ctl->tree_lock);
663 spin_unlock(&ctl->tree_lock);
667 struct btrfs_free_space_ctl *ctl,
775 spin_lock(&ctl->tree_lock);
776 ret = link_free_space(ctl, e);
777 spin_unlock(&ctl->tree_lock);
795 spin_lock(&ctl->tree_lock);
796 ret = link_free_space(ctl, e);
798 spin_unlock(&ctl->tree_lock);
804 ctl->total_bitmaps++;
805 ctl->op->recalc_thresholds(ctl);
806 spin_unlock(&ctl->tree_lock);
824 e->bitmap_extents = count_bitmap_extents(ctl, e);
826 ctl->discardable_extents[BTRFS_STAT_CURR] +=
828 ctl->discardable_bytes[BTRFS_STAT_CURR] += e->bytes;
833 merge_space_tree(ctl);
836 btrfs_discard_update_discardable(ctl->private, ctl);
841 __btrfs_remove_free_space_cache(ctl);
848 struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
906 ret = __load_free_space_cache(fs_info->tree_root, inode, ctl,
912 spin_lock(&ctl->tree_lock);
913 matched = (ctl->free_space == (block_group->length - used -
915 spin_unlock(&ctl->tree_lock);
918 __btrfs_remove_free_space_cache(ctl);
943 struct btrfs_free_space_ctl *ctl,
951 struct rb_node *node = rb_first(&ctl->free_space_offset);
1003 list_for_each_entry(trim_entry, &ctl->trimming_ranges, list) {
1248 * @ctl - the free space cache we are going to write out
1257 struct btrfs_free_space_ctl *ctl,
1302 mutex_lock(&ctl->cache_writeout_mutex);
1304 spin_lock(&ctl->tree_lock);
1305 ret = write_cache_extent_entries(io_ctl, ctl,
1329 spin_unlock(&ctl->tree_lock);
1330 mutex_unlock(&ctl->cache_writeout_mutex);
1372 spin_unlock(&ctl->tree_lock);
1373 mutex_unlock(&ctl->cache_writeout_mutex);
1400 struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
1415 ret = __btrfs_write_out_cache(fs_info->tree_root, inode, ctl,
1450 static inline u64 offset_to_bitmap(struct btrfs_free_space_ctl *ctl,
1456 bytes_per_bitmap = BITS_PER_BITMAP * ctl->unit;
1457 bitmap_start = offset - ctl->start;
1460 bitmap_start += ctl->start;
1524 tree_search_offset(struct btrfs_free_space_ctl *ctl,
1527 struct rb_node *n = ctl->free_space_offset.rb_node;
1613 if (entry->offset + BITS_PER_BITMAP * ctl->unit > offset)
1624 ctl->unit > offset)
1640 __unlink_free_space(struct btrfs_free_space_ctl *ctl,
1643 rb_erase(&info->offset_index, &ctl->free_space_offset);
1644 ctl->free_extents--;
1647 ctl->discardable_extents[BTRFS_STAT_CURR]--;
1648 ctl->discardable_bytes[BTRFS_STAT_CURR] -= info->bytes;
1652 static void unlink_free_space(struct btrfs_free_space_ctl *ctl,
1655 __unlink_free_space(ctl, info);
1656 ctl->free_space -= info->bytes;
1659 static int link_free_space(struct btrfs_free_space_ctl *ctl,
1665 ret = tree_insert_offset(&ctl->free_space_offset, info->offset,
1671 ctl->discardable_extents[BTRFS_STAT_CURR]++;
1672 ctl->discardable_bytes[BTRFS_STAT_CURR] += info->bytes;
1675 ctl->free_space += info->bytes;
1676 ctl->free_extents++;
1680 static void recalculate_thresholds(struct btrfs_free_space_ctl *ctl)
1682 struct btrfs_block_group *block_group = ctl->private;
1687 u64 bytes_per_bg = BITS_PER_BITMAP * ctl->unit;
1692 ASSERT(ctl->total_bitmaps <= max_bitmaps);
1705 bitmap_bytes = ctl->total_bitmaps * ctl->unit;
1714 ctl->extents_thresh =
1718 static inline void __bitmap_clear_bits(struct btrfs_free_space_ctl *ctl,
1725 start = offset_to_bit(info->offset, ctl->unit, offset);
1726 count = bytes_to_bits(bytes, ctl->unit);
1733 if (info->max_extent_size > ctl->unit)
1744 ctl->discardable_extents[BTRFS_STAT_CURR] += extent_delta;
1745 ctl->discardable_bytes[BTRFS_STAT_CURR] -= bytes;
1749 static void bitmap_clear_bits(struct btrfs_free_space_ctl *ctl,
1753 __bitmap_clear_bits(ctl, info, offset, bytes);
1754 ctl->free_space -= bytes;
1757 static void bitmap_set_bits(struct btrfs_free_space_ctl *ctl,
1764 start = offset_to_bit(info->offset, ctl->unit, offset);
1765 count = bytes_to_bits(bytes, ctl->unit);
1772 ctl->free_space += bytes;
1782 ctl->discardable_extents[BTRFS_STAT_CURR] += extent_delta;
1783 ctl->discardable_bytes[BTRFS_STAT_CURR] += bytes;
1791 static int search_bitmap(struct btrfs_free_space_ctl *ctl,
1812 i = offset_to_bit(bitmap_info->offset, ctl->unit,
1814 bits = bytes_to_bits(*bytes, ctl->unit);
1834 *offset = (u64)(i * ctl->unit) + bitmap_info->offset;
1835 *bytes = (u64)(found_bits) * ctl->unit;
1839 *bytes = (u64)(max_bits) * ctl->unit;
1853 find_free_space(struct btrfs_free_space_ctl *ctl, u64 *offset, u64 *bytes,
1862 if (!ctl->free_space_offset.rb_node)
1865 entry = tree_search_offset(ctl, offset_to_bitmap(ctl, *offset), 0, 1);
1881 tmp = entry->offset - ctl->start + align - 1;
1883 tmp = tmp * align + ctl->start;
1899 ret = search_bitmap(ctl, entry, &tmp, &size, true);
1920 static int count_bitmap_extents(struct btrfs_free_space_ctl *ctl,
1923 struct btrfs_block_group *block_group = ctl->private;
1933 bytes -= (rs - re) * ctl->unit;
1943 static void add_new_bitmap(struct btrfs_free_space_ctl *ctl,
1946 info->offset = offset_to_bitmap(ctl, offset);
1950 link_free_space(ctl, info);
1951 ctl->total_bitmaps++;
1953 ctl->op->recalc_thresholds(ctl);
1956 static void free_bitmap(struct btrfs_free_space_ctl *ctl,
1966 ctl->discardable_extents[BTRFS_STAT_CURR] -=
1968 ctl->discardable_bytes[BTRFS_STAT_CURR] -= bitmap_info->bytes;
1971 unlink_free_space(ctl, bitmap_info);
1974 ctl->total_bitmaps--;
1975 ctl->op->recalc_thresholds(ctl);
1978 static noinline int remove_from_bitmap(struct btrfs_free_space_ctl *ctl,
1987 end = bitmap_info->offset + (u64)(BITS_PER_BITMAP * ctl->unit) - 1;
1996 search_bytes = ctl->unit;
1998 ret = search_bitmap(ctl, bitmap_info, &search_start, &search_bytes,
2009 bitmap_clear_bits(ctl, bitmap_info, search_start, search_bytes);
2016 free_bitmap(ctl, bitmap_info);
2042 search_bytes = ctl->unit;
2043 ret = search_bitmap(ctl, bitmap_info, &search_start,
2050 free_bitmap(ctl, bitmap_info);
2055 static u64 add_bytes_to_bitmap(struct btrfs_free_space_ctl *ctl,
2068 ctl->discardable_extents[BTRFS_STAT_CURR] +=
2070 ctl->discardable_bytes[BTRFS_STAT_CURR] += info->bytes;
2075 end = info->offset + (u64)(BITS_PER_BITMAP * ctl->unit);
2079 bitmap_set_bits(ctl, info, offset, bytes_to_set);
2091 static bool use_bitmap(struct btrfs_free_space_ctl *ctl,
2094 struct btrfs_block_group *block_group = ctl->private;
2111 if (!forced && ctl->free_extents < ctl->extents_thresh) {
2120 if (ctl->free_extents * 3 <= ctl->extents_thresh)
2135 if (((BITS_PER_BITMAP * ctl->unit) >> 1) > block_group->length)
2146 static int insert_into_bitmap(struct btrfs_free_space_ctl *ctl,
2160 if (!ctl->op->use_bitmap(ctl, info))
2163 if (ctl->op == &free_space_op)
2164 block_group = ctl->private;
2192 if (entry->offset == offset_to_bitmap(ctl, offset)) {
2193 bytes_added = add_bytes_to_bitmap(ctl, entry, offset,
2206 bitmap_info = tree_search_offset(ctl, offset_to_bitmap(ctl, offset),
2213 bytes_added = add_bytes_to_bitmap(ctl, bitmap_info, offset, bytes,
2227 add_new_bitmap(ctl, info, offset);
2232 spin_unlock(&ctl->tree_lock);
2239 spin_lock(&ctl->tree_lock);
2249 spin_lock(&ctl->tree_lock);
2284 static bool try_merge_free_space(struct btrfs_free_space_ctl *ctl,
2299 right_info = tree_search_offset(ctl, offset + bytes, 0, 0);
2304 left_info = tree_search_offset(ctl, offset - 1, 0, 0);
2310 unlink_free_space(ctl, right_info);
2312 __unlink_free_space(ctl, right_info);
2323 unlink_free_space(ctl, left_info);
2325 __unlink_free_space(ctl, left_info);
2335 static bool steal_from_bitmap_to_end(struct btrfs_free_space_ctl *ctl,
2343 const u64 bitmap_offset = offset_to_bitmap(ctl, end);
2346 bitmap = tree_search_offset(ctl, bitmap_offset, 1, 0);
2350 i = offset_to_bit(bitmap->offset, ctl->unit, end);
2354 bytes = (j - i) * ctl->unit;
2362 bitmap_clear_bits(ctl, bitmap, end, bytes);
2364 __bitmap_clear_bits(ctl, bitmap, end, bytes);
2367 free_bitmap(ctl, bitmap);
2372 static bool steal_from_bitmap_to_front(struct btrfs_free_space_ctl *ctl,
2383 bitmap_offset = offset_to_bitmap(ctl, info->offset);
2388 bitmap_offset = offset_to_bitmap(ctl, info->offset - 1);
2391 bitmap = tree_search_offset(ctl, bitmap_offset, 1, 0);
2395 i = offset_to_bit(bitmap->offset, ctl->unit, info->offset) - 1;
2407 bytes = (i + 1) * ctl->unit;
2409 bytes = (i - prev_j) * ctl->unit;
2419 bitmap_clear_bits(ctl, bitmap, info->offset, bytes);
2421 __bitmap_clear_bits(ctl, bitmap, info->offset, bytes);
2424 free_bitmap(ctl, bitmap);
2440 static void steal_from_bitmap(struct btrfs_free_space_ctl *ctl,
2451 if (ctl->total_bitmaps > 0) {
2455 stole_end = steal_from_bitmap_to_end(ctl, info, update_stat);
2456 if (ctl->total_bitmaps > 0)
2457 stole_front = steal_from_bitmap_to_front(ctl, info,
2461 try_merge_free_space(ctl, info, update_stat);
2466 struct btrfs_free_space_ctl *ctl,
2470 struct btrfs_block_group *block_group = ctl->private;
2484 spin_lock(&ctl->tree_lock);
2486 if (try_merge_free_space(ctl, info, true))
2494 ret = insert_into_bitmap(ctl, info);
2508 steal_from_bitmap(ctl, info, true);
2512 ret = link_free_space(ctl, info);
2516 btrfs_discard_update_discardable(block_group, ctl);
2517 spin_unlock(&ctl->tree_lock);
2567 struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
2572 spin_lock(&ctl->tree_lock);
2579 info = tree_search_offset(ctl, offset, 0, 0);
2585 info = tree_search_offset(ctl, offset_to_bitmap(ctl, offset),
2600 unlink_free_space(ctl, info);
2607 ret = link_free_space(ctl, info);
2620 ret = link_free_space(ctl, info);
2634 spin_unlock(&ctl->tree_lock);
2636 ret = __btrfs_add_free_space(block_group->fs_info, ctl,
2645 ret = remove_from_bitmap(ctl, info, &offset, &bytes);
2651 btrfs_discard_update_discardable(block_group, ctl);
2652 spin_unlock(&ctl->tree_lock);
2661 struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
2666 spin_lock(&ctl->tree_lock);
2667 for (n = rb_first(&ctl->free_space_offset); n; n = rb_next(n)) {
2675 spin_unlock(&ctl->tree_lock);
2685 struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
2687 spin_lock_init(&ctl->tree_lock);
2688 ctl->unit = fs_info->sectorsize;
2689 ctl->start = block_group->start;
2690 ctl->private = block_group;
2691 ctl->op = &free_space_op;
2692 INIT_LIST_HEAD(&ctl->trimming_ranges);
2693 mutex_init(&ctl->cache_writeout_mutex);
2700 ctl->extents_thresh = (SZ_32K / 2) / sizeof(struct btrfs_free_space);
2713 struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
2740 ctl->discardable_extents[BTRFS_STAT_CURR]--;
2741 ctl->discardable_bytes[BTRFS_STAT_CURR] -=
2745 try_merge_free_space(ctl, entry, false);
2746 steal_from_bitmap(ctl, entry, false);
2750 ctl->discardable_extents[BTRFS_STAT_CURR]++;
2751 ctl->discardable_bytes[BTRFS_STAT_CURR] +=
2755 tree_insert_offset(&ctl->free_space_offset,
2764 struct btrfs_free_space_ctl *ctl)
2769 while ((node = rb_last(&ctl->free_space_offset)) != NULL) {
2772 unlink_free_space(ctl, info);
2775 free_bitmap(ctl, info);
2778 cond_resched_lock(&ctl->tree_lock);
2782 void __btrfs_remove_free_space_cache(struct btrfs_free_space_ctl *ctl)
2784 spin_lock(&ctl->tree_lock);
2785 __btrfs_remove_free_space_cache_locked(ctl);
2786 if (ctl->private)
2787 btrfs_discard_update_discardable(ctl->private, ctl);
2788 spin_unlock(&ctl->tree_lock);
2793 struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
2797 spin_lock(&ctl->tree_lock);
2806 cond_resched_lock(&ctl->tree_lock);
2808 __btrfs_remove_free_space_cache_locked(ctl);
2809 btrfs_discard_update_discardable(block_group, ctl);
2810 spin_unlock(&ctl->tree_lock);
2822 struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
2827 spin_lock(&ctl->tree_lock);
2828 node = rb_first(&ctl->free_space_offset);
2841 spin_unlock(&ctl->tree_lock);
2849 struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
2859 spin_lock(&ctl->tree_lock);
2860 entry = find_free_space(ctl, &offset, &bytes_search,
2867 bitmap_clear_bits(ctl, entry, offset, bytes);
2873 free_bitmap(ctl, entry);
2875 unlink_free_space(ctl, entry);
2890 link_free_space(ctl, entry);
2893 btrfs_discard_update_discardable(block_group, ctl);
2894 spin_unlock(&ctl->tree_lock);
2897 __btrfs_add_free_space(block_group->fs_info, ctl,
2915 struct btrfs_free_space_ctl *ctl;
2933 ctl = block_group->free_space_ctl;
2936 spin_lock(&ctl->tree_lock);
2938 spin_unlock(&ctl->tree_lock);
2952 struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
2961 err = search_bitmap(ctl, entry, &search_start, &search_bytes, true);
2969 __bitmap_clear_bits(ctl, entry, ret, bytes);
2983 struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
3046 spin_lock(&ctl->tree_lock);
3051 ctl->free_space -= bytes;
3053 ctl->discardable_bytes[BTRFS_STAT_CURR] -= bytes;
3058 ctl->free_extents--;
3062 ctl->total_bitmaps--;
3063 ctl->op->recalc_thresholds(ctl);
3065 ctl->discardable_extents[BTRFS_STAT_CURR]--;
3071 spin_unlock(&ctl->tree_lock);
3082 struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
3093 i = offset_to_bit(entry->offset, ctl->unit,
3095 want_bits = bytes_to_bits(bytes, ctl->unit);
3096 min_bits = bytes_to_bits(min_bytes, ctl->unit);
3122 entry->max_extent_size = (u64)max_bits * ctl->unit;
3133 if (cluster->max_size < found_bits * ctl->unit)
3134 cluster->max_size = found_bits * ctl->unit;
3141 cluster->window_start = start * ctl->unit + entry->offset;
3142 rb_erase(&entry->offset_index, &ctl->free_space_offset);
3148 total_found * ctl->unit, 1);
3163 struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
3172 entry = tree_search_offset(ctl, offset, 0, 1);
3232 rb_erase(&entry->offset_index, &ctl->free_space_offset);
3254 struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
3257 u64 bitmap_offset = offset_to_bitmap(ctl, offset);
3259 if (ctl->total_bitmaps == 0)
3270 entry = tree_search_offset(ctl, bitmap_offset, 1, 0);
3304 struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
3327 spin_lock(&ctl->tree_lock);
3333 if (ctl->free_space < bytes) {
3334 spin_unlock(&ctl->tree_lock);
3371 spin_unlock(&ctl->tree_lock);
3398 struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
3422 mutex_lock(&ctl->cache_writeout_mutex);
3424 __btrfs_add_free_space(fs_info, ctl, reserved_start,
3428 __btrfs_add_free_space(fs_info, ctl, end, reserved_end - end,
3430 __btrfs_add_free_space(fs_info, ctl, start, bytes, trim_state);
3432 mutex_unlock(&ctl->cache_writeout_mutex);
3457 struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
3470 mutex_lock(&ctl->cache_writeout_mutex);
3471 spin_lock(&ctl->tree_lock);
3473 if (ctl->free_space < minlen)
3476 entry = tree_search_offset(ctl, start, 0, 1);
3500 spin_unlock(&ctl->tree_lock);
3501 mutex_unlock(&ctl->cache_writeout_mutex);
3504 unlink_free_space(ctl, entry);
3517 link_free_space(ctl, entry);
3525 spin_unlock(&ctl->tree_lock);
3526 mutex_unlock(&ctl->cache_writeout_mutex);
3530 unlink_free_space(ctl, entry);
3534 spin_unlock(&ctl->tree_lock);
3537 list_add_tail(&trim_entry.list, &ctl->trimming_ranges);
3538 mutex_unlock(&ctl->cache_writeout_mutex);
3565 spin_unlock(&ctl->tree_lock);
3566 mutex_unlock(&ctl->cache_writeout_mutex);
3585 static void reset_trimming_bitmap(struct btrfs_free_space_ctl *ctl, u64 offset)
3589 spin_lock(&ctl->tree_lock);
3590 entry = tree_search_offset(ctl, offset, 1, 0);
3593 ctl->discardable_extents[BTRFS_STAT_CURR] +=
3595 ctl->discardable_bytes[BTRFS_STAT_CURR] += entry->bytes;
3600 spin_unlock(&ctl->tree_lock);
3603 static void end_trimming_bitmap(struct btrfs_free_space_ctl *ctl,
3608 ctl->discardable_extents[BTRFS_STAT_CURR] -=
3610 ctl->discardable_bytes[BTRFS_STAT_CURR] -= entry->bytes;
3623 struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
3628 u64 offset = offset_to_bitmap(ctl, start);
3635 mutex_lock(&ctl->cache_writeout_mutex);
3636 spin_lock(&ctl->tree_lock);
3638 if (ctl->free_space < minlen) {
3641 spin_unlock(&ctl->tree_lock);
3642 mutex_unlock(&ctl->cache_writeout_mutex);
3646 entry = tree_search_offset(ctl, offset, 1, 0);
3657 spin_unlock(&ctl->tree_lock);
3658 mutex_unlock(&ctl->cache_writeout_mutex);
3673 ret2 = search_bitmap(ctl, entry, &start, &bytes, false);
3680 end_trimming_bitmap(ctl, entry);
3683 spin_unlock(&ctl->tree_lock);
3684 mutex_unlock(&ctl->cache_writeout_mutex);
3694 spin_unlock(&ctl->tree_lock);
3695 mutex_unlock(&ctl->cache_writeout_mutex);
3701 spin_unlock(&ctl->tree_lock);
3702 mutex_unlock(&ctl->cache_writeout_mutex);
3717 bitmap_clear_bits(ctl, entry, start, bytes);
3719 free_bitmap(ctl, entry);
3721 spin_unlock(&ctl->tree_lock);
3724 list_add_tail(&trim_entry.list, &ctl->trimming_ranges);
3725 mutex_unlock(&ctl->cache_writeout_mutex);
3730 reset_trimming_bitmap(ctl, offset);
3737 offset += BITS_PER_BITMAP * ctl->unit;
3746 reset_trimming_bitmap(ctl, offset);
3764 struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
3783 div64_u64_rem(end, BITS_PER_BITMAP * ctl->unit, &rem);
3786 reset_trimming_bitmap(ctl, offset_to_bitmap(ctl, end));
3847 struct btrfs_free_space_ctl *ctl = fs_root->free_ino_ctl;
3851 spin_lock(&ctl->tree_lock);
3853 if (RB_EMPTY_ROOT(&ctl->free_space_offset))
3856 entry = rb_entry(rb_first(&ctl->free_space_offset),
3862 unlink_free_space(ctl, entry);
3868 link_free_space(ctl, entry);
3874 ret = search_bitmap(ctl, entry, &offset, &count, true);
3879 bitmap_clear_bits(ctl, entry, offset, 1);
3881 free_bitmap(ctl, entry);
3884 spin_unlock(&ctl->tree_lock);
3923 struct btrfs_free_space_ctl *ctl = root->free_ino_ctl;
3950 ret = __load_free_space_cache(root, inode, ctl, path, 0);
3969 struct btrfs_free_space_ctl *ctl = root->free_ino_ctl;
3978 ret = __btrfs_write_out_cache(root, inode, ctl, NULL, &io_ctl, trans);
4012 struct btrfs_free_space_ctl *ctl = cache->free_space_ctl;
4027 spin_lock(&ctl->tree_lock);
4031 ret = link_free_space(ctl, info);
4032 spin_unlock(&ctl->tree_lock);
4046 spin_lock(&ctl->tree_lock);
4047 bitmap_info = tree_search_offset(ctl, offset_to_bitmap(ctl, offset),
4052 add_new_bitmap(ctl, info, offset);
4057 bytes_added = add_bytes_to_bitmap(ctl, bitmap_info, offset, bytes,
4062 spin_unlock(&ctl->tree_lock);
4082 struct btrfs_free_space_ctl *ctl = cache->free_space_ctl;
4086 spin_lock(&ctl->tree_lock);
4087 info = tree_search_offset(ctl, offset, 0, 0);
4089 info = tree_search_offset(ctl, offset_to_bitmap(ctl, offset),
4102 bit_bytes = ctl->unit;
4103 ret = search_bitmap(ctl, info, &bit_off, &bit_bytes, false);
4155 spin_unlock(&ctl->tree_lock);