Lines Matching full:block_size

72 			__le32 block_size;  member
155 unsigned int block_size; member
557 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()
1252 unsigned int remaining_size = wc->block_size; in bio_copy_block()
1366 dm_accept_partial_bio(bio, wc->block_size >> SECTOR_SHIFT); in writecache_map_read()
1375 wc->stats.reads += (bio->bi_iter.bi_size - wc->block_size) >> wc->block_size_bits; in writecache_map_read()
1385 unsigned int bio_size = wc->block_size; in writecache_bio_copy_ssd()
1409 read_original_sector(wc, e) + (wc->block_size >> SECTOR_SHIFT)) in writecache_bio_copy_ssd()
1417 bio_size += wc->block_size; in writecache_bio_copy_ssd()
1418 current_cache_sec += wc->block_size >> SECTOR_SHIFT; in writecache_bio_copy_ssd()
1426 wc->stats.writes_allocate += (bio->bi_iter.bi_size - wc->block_size) >> wc->block_size_bits; in writecache_bio_copy_ssd()
1558 (wc->block_size / 512 - 1)) != 0)) { in writecache_map()
1561 bio->bi_iter.bi_size, wc->block_size); in writecache_map()
1644 if (limits->logical_block_size < wc->block_size) in writecache_io_hints()
1645 limits->logical_block_size = wc->block_size; in writecache_io_hints()
1647 if (limits->physical_block_size < wc->block_size) in writecache_io_hints()
1648 limits->physical_block_size = wc->block_size; in writecache_io_hints()
1650 if (limits->io_min < wc->block_size) in writecache_io_hints()
1651 limits->io_min = wc->block_size; in writecache_io_hints()
1800 unsigned int block_size = wc->block_size; in wc_add_block() local
1803 persistent_memory_flush_cache(address, block_size); in wc_add_block()
1809 block_size, persistent_memory_page_offset(address)) != 0; in wc_add_block()
1869 read_original_sector(wc, e) + (wc->block_size >> SECTOR_SHIFT)) in __writecache_writeback_pmem()
1921 while ((n_sectors -= wc->block_size >> SECTOR_SHIFT)) { in __writecache_writeback_ssd()
2050 read_original_sector(wc, f) + (wc->block_size >> SECTOR_SHIFT)) in writecache_writeback()
2114 static int calculate_memory_size(uint64_t device_size, unsigned int block_size, in calculate_memory_size() argument
2121 do_div(n_blocks, block_size + sizeof(struct wc_memory_entry)); in calculate_memory_size()
2131 offset = (offset + block_size - 1) & ~(uint64_t)(block_size - 1); in calculate_memory_size()
2132 if (offset + n_blocks * block_size <= device_size) in calculate_memory_size()
2145 *n_metadata_blocks_p = offset >> __ffs(block_size); in calculate_memory_size()
2154 r = calculate_memory_size(wc->memory_map_size, wc->block_size, &wc->n_blocks, NULL); in init_memory()
2165 pmem_assign(sb(wc)->block_size, cpu_to_le32(wc->block_size)); in init_memory()
2376 if (sscanf(string, "%u%c", &wc->block_size, &dummy) != 1 || in writecache_ctr()
2377 wc->block_size < 512 || wc->block_size > PAGE_SIZE || in writecache_ctr()
2378 (wc->block_size & (wc->block_size - 1))) { in writecache_ctr()
2383 if (wc->block_size < bdev_logical_block_size(wc->dev->bdev) || in writecache_ctr()
2384 wc->block_size < bdev_logical_block_size(wc->ssd_dev->bdev)) { in writecache_ctr()
2389 wc->block_size_bits = __ffs(wc->block_size); in writecache_ctr()
2534 r = calculate_memory_size(wc->memory_map_size, wc->block_size, in writecache_ctr()
2575 r = writecache_read_metadata(wc, wc->block_size >> SECTOR_SHIFT); in writecache_ctr()
2613 if (le32_to_cpu(s.block_size) != wc->block_size) { in writecache_ctr()
2631 offset = (offset + wc->block_size - 1) & ~(size_t)(wc->block_size - 1); in writecache_ctr()
2632 data_size = wc->n_blocks * (size_t)wc->block_size; in writecache_ctr()
2633 if (!offset || (data_size / wc->block_size != wc->n_blocks) || in writecache_ctr()
2706 wc->dev->name, wc->ssd_dev->name, wc->block_size); in writecache_status()