Lines Matching refs:discard_block_size
359 uint32_t discard_block_size; /* a power of 2 times sectors per block */ member
654 dm_block_t oblocks = cache->discard_block_size; in oblocks_per_dblock()
1003 *b = to_dblock(dm_sector_div_up(sb, cache->discard_block_size)); in calc_discard_block_range()
1005 if (se - sb < cache->discard_block_size) in calc_discard_block_range()
1008 *e = to_dblock(block_div(se, cache->discard_block_size)); in calc_discard_block_range()
2308 static bool too_many_discard_blocks(sector_t discard_block_size, in too_many_discard_blocks() argument
2311 (void) sector_div(origin_size, discard_block_size); in too_many_discard_blocks()
2319 sector_t discard_block_size = cache_block_size; in calculate_discard_block_size() local
2322 while (too_many_discard_blocks(discard_block_size, origin_size)) in calculate_discard_block_size()
2323 discard_block_size *= 2; in calculate_discard_block_size()
2325 return discard_block_size; in calculate_discard_block_size()
2466 cache->discard_block_size = in cache_create()
2470 cache->discard_block_size)); in cache_create()
2672 r = dm_cache_discard_bitset_resize(cache->cmd, cache->discard_block_size, in write_discard_bitset()
2816 b = dm_sector_div_up(b, li->cache->discard_block_size); in set_discard_range()
2817 sector_div(e, li->cache->discard_block_size); in set_discard_range()
2830 static int load_discard(void *context, sector_t discard_block_size, in load_discard() argument
2835 li->block_size = discard_block_size; in load_discard()
3365 limits->max_discard_sectors = min_t(sector_t, cache->discard_block_size * 1024, in set_discard_limits()
3367 limits->discard_granularity = cache->discard_block_size << SECTOR_SHIFT; in set_discard_limits()