Lines Matching refs:block_size

72 			__le32 block_size;  member
158 unsigned block_size; member
558 region.count = max(4096U, wc->block_size) >> SECTOR_SHIFT; in ssd_commit_superblock()
786 writecache_flush_region(wc, memory_data(wc, e), wc->block_size); in writecache_flush_entry()
1247 unsigned remaining_size = wc->block_size; in bio_copy_block()
1359 dm_accept_partial_bio(bio, wc->block_size >> SECTOR_SHIFT); in writecache_map_read()
1368 wc->stats.reads += (bio->bi_iter.bi_size - wc->block_size) >> wc->block_size_bits; in writecache_map_read()
1378 unsigned bio_size = wc->block_size; in writecache_bio_copy_ssd()
1400 read_original_sector(wc, e) + (wc->block_size >> SECTOR_SHIFT)) in writecache_bio_copy_ssd()
1408 bio_size += wc->block_size; in writecache_bio_copy_ssd()
1409 current_cache_sec += wc->block_size >> SECTOR_SHIFT; in writecache_bio_copy_ssd()
1417 wc->stats.writes_allocate += (bio->bi_iter.bi_size - wc->block_size) >> wc->block_size_bits; in writecache_bio_copy_ssd()
1548 (wc->block_size / 512 - 1)) != 0)) { in writecache_map()
1551 bio->bi_iter.bi_size, wc->block_size); in writecache_map()
1632 if (limits->logical_block_size < wc->block_size) in writecache_io_hints()
1633 limits->logical_block_size = wc->block_size; in writecache_io_hints()
1635 if (limits->physical_block_size < wc->block_size) in writecache_io_hints()
1636 limits->physical_block_size = wc->block_size; in writecache_io_hints()
1638 if (limits->io_min < wc->block_size) in writecache_io_hints()
1639 limits->io_min = wc->block_size; in writecache_io_hints()
1788 unsigned block_size = wc->block_size; in wc_add_block() local
1791 persistent_memory_flush_cache(address, block_size); in wc_add_block()
1797 block_size, persistent_memory_page_offset(address)) != 0; in wc_add_block()
1854 read_original_sector(wc, e) + (wc->block_size >> SECTOR_SHIFT)) in __writecache_writeback_pmem()
1906 while ((n_sectors -= wc->block_size >> SECTOR_SHIFT)) { in __writecache_writeback_ssd()
2035 read_original_sector(wc, f) + (wc->block_size >> SECTOR_SHIFT)) in writecache_writeback()
2098 static int calculate_memory_size(uint64_t device_size, unsigned block_size, in calculate_memory_size() argument
2105 do_div(n_blocks, block_size + sizeof(struct wc_memory_entry)); in calculate_memory_size()
2115 offset = (offset + block_size - 1) & ~(uint64_t)(block_size - 1); in calculate_memory_size()
2116 if (offset + n_blocks * block_size <= device_size) in calculate_memory_size()
2129 *n_metadata_blocks_p = offset >> __ffs(block_size); in calculate_memory_size()
2138 r = calculate_memory_size(wc->memory_map_size, wc->block_size, &wc->n_blocks, NULL); in init_memory()
2149 pmem_assign(sb(wc)->block_size, cpu_to_le32(wc->block_size)); in init_memory()
2360 if (sscanf(string, "%u%c", &wc->block_size, &dummy) != 1 || in writecache_ctr()
2361 wc->block_size < 512 || wc->block_size > PAGE_SIZE || in writecache_ctr()
2362 (wc->block_size & (wc->block_size - 1))) { in writecache_ctr()
2367 if (wc->block_size < bdev_logical_block_size(wc->dev->bdev) || in writecache_ctr()
2368 wc->block_size < bdev_logical_block_size(wc->ssd_dev->bdev)) { in writecache_ctr()
2373 wc->block_size_bits = __ffs(wc->block_size); in writecache_ctr()
2512 r = calculate_memory_size(wc->memory_map_size, wc->block_size, in writecache_ctr()
2553 r = writecache_read_metadata(wc, wc->block_size >> SECTOR_SHIFT); in writecache_ctr()
2591 if (le32_to_cpu(s.block_size) != wc->block_size) { in writecache_ctr()
2609 offset = (offset + wc->block_size - 1) & ~(size_t)(wc->block_size - 1); in writecache_ctr()
2610 data_size = wc->n_blocks * (size_t)wc->block_size; in writecache_ctr()
2611 if (!offset || (data_size / wc->block_size != wc->n_blocks) || in writecache_ctr()
2684 wc->dev->name, wc->ssd_dev->name, wc->block_size); in writecache_status()