Lines Matching refs:unit
696 u64 bytes_per_bg = BITS_PER_BITMAP * ctl->unit; in recalculate_thresholds()
705 ctl->total_bitmaps, ctl->unit, max_bitmaps, in recalculate_thresholds()
720 bitmap_bytes = ctl->total_bitmaps * ctl->unit; in recalculate_thresholds()
918 u64 bytes = ctl->unit; in copy_free_space_cache()
1561 static inline unsigned long offset_to_bit(u64 bitmap_start, u32 unit, in offset_to_bit() argument
1566 return (unsigned long)(div_u64(offset, unit)); in offset_to_bit()
1569 static inline unsigned long bytes_to_bits(u64 bytes, u32 unit) in bytes_to_bits() argument
1571 return (unsigned long)(div_u64(bytes, unit)); in bytes_to_bits()
1580 bytes_per_bitmap = BITS_PER_BITMAP * ctl->unit; in offset_to_bitmap()
1794 if (entry->offset + BITS_PER_BITMAP * ctl->unit > offset) in tree_search_offset()
1809 ctl->unit > offset) in tree_search_offset()
1887 start = offset_to_bit(info->offset, ctl->unit, offset); in bitmap_clear_bits()
1888 count = bytes_to_bits(bytes, ctl->unit); in bitmap_clear_bits()
1895 if (info->max_extent_size > ctl->unit) in bitmap_clear_bits()
1923 start = offset_to_bit(info->offset, ctl->unit, offset); in btrfs_bitmap_set_bits()
1924 count = bytes_to_bits(bytes, ctl->unit); in btrfs_bitmap_set_bits()
1978 i = offset_to_bit(bitmap_info->offset, ctl->unit, in search_bitmap()
1980 bits = bytes_to_bits(*bytes, ctl->unit); in search_bitmap()
2000 *offset = (u64)(i * ctl->unit) + bitmap_info->offset; in search_bitmap()
2001 *bytes = (u64)(found_bits) * ctl->unit; in search_bitmap()
2005 *bytes = (u64)(max_bits) * ctl->unit; in search_bitmap()
2162 end = bitmap_info->offset + (u64)(BITS_PER_BITMAP * ctl->unit) - 1; in remove_from_bitmap()
2171 search_bytes = ctl->unit; in remove_from_bitmap()
2217 search_bytes = ctl->unit; in remove_from_bitmap()
2250 end = info->offset + (u64)(BITS_PER_BITMAP * ctl->unit); in add_bytes_to_bitmap()
2304 if (((BITS_PER_BITMAP * ctl->unit) >> 1) > block_group->length) in use_bitmap()
2514 i = offset_to_bit(bitmap->offset, ctl->unit, end); in steal_from_bitmap_to_end()
2518 bytes = (j - i) * ctl->unit; in steal_from_bitmap_to_end()
2556 i = offset_to_bit(bitmap->offset, ctl->unit, info->offset) - 1; in steal_from_bitmap_to_front()
2568 bytes = (i + 1) * ctl->unit; in steal_from_bitmap_to_front()
2570 bytes = (i - prev_j) * ctl->unit; in steal_from_bitmap_to_front()
2956 ctl->unit = fs_info->sectorsize; in btrfs_init_free_space_ctl()
3339 i = offset_to_bit(entry->offset, ctl->unit, in btrfs_bitmap_cluster()
3341 want_bits = bytes_to_bits(bytes, ctl->unit); in btrfs_bitmap_cluster()
3342 min_bits = bytes_to_bits(min_bytes, ctl->unit); in btrfs_bitmap_cluster()
3368 entry->max_extent_size = (u64)max_bits * ctl->unit; in btrfs_bitmap_cluster()
3379 if (cluster->max_size < found_bits * ctl->unit) in btrfs_bitmap_cluster()
3380 cluster->max_size = found_bits * ctl->unit; in btrfs_bitmap_cluster()
3387 cluster->window_start = start * ctl->unit + entry->offset; in btrfs_bitmap_cluster()
3404 total_found * ctl->unit, 1); in btrfs_bitmap_cluster()
3996 offset += BITS_PER_BITMAP * ctl->unit; in trim_bitmaps()
4044 div64_u64_rem(end, BITS_PER_BITMAP * ctl->unit, &rem); in btrfs_trim_block_group()
4282 bit_bytes = ctl->unit; in test_check_exists()