• Home
  • Raw
  • Download

Lines Matching refs:n_blocks

71 			__le64 n_blocks;  member
149 size_t n_blocks; member
940 wc->entries = vmalloc(array_size(sizeof(struct wc_entry), wc->n_blocks)); in writecache_alloc_entries()
943 for (b = 0; b < wc->n_blocks; b++) { in writecache_alloc_entries()
1015 for (b = 0; b < wc->n_blocks; b++) { in writecache_resume()
1037 for (b = 0; b < wc->n_blocks; b++) { in writecache_resume()
1133 wc->freelist_high_watermark = wc->n_blocks; in activate_cleaner()
1134 wc->freelist_low_watermark = wc->n_blocks; in activate_cleaner()
1967 uint64_t n_blocks, offset; in calculate_memory_size() local
1970 n_blocks = device_size; in calculate_memory_size()
1971 do_div(n_blocks, block_size + sizeof(struct wc_memory_entry)); in calculate_memory_size()
1974 if (!n_blocks) in calculate_memory_size()
1977 if (n_blocks >= ((size_t)-sizeof(struct wc_memory_superblock) / in calculate_memory_size()
1980 offset = offsetof(struct wc_memory_superblock, entries[n_blocks]); in calculate_memory_size()
1982 if (offset + n_blocks * block_size <= device_size) in calculate_memory_size()
1984 n_blocks--; in calculate_memory_size()
1988 e.index = n_blocks; in calculate_memory_size()
1989 if (e.index != n_blocks) in calculate_memory_size()
1993 *n_blocks_p = n_blocks; in calculate_memory_size()
2004 r = calculate_memory_size(wc->memory_map_size, wc->block_size, &wc->n_blocks, NULL); in init_memory()
2016 pmem_assign(sb(wc)->n_blocks, cpu_to_le64(wc->n_blocks)); in init_memory()
2019 for (b = 0; b < wc->n_blocks; b++) { in init_memory()
2350 size_t n_blocks, n_metadata_blocks; in writecache_ctr() local
2366 &n_blocks, &n_metadata_blocks); in writecache_ctr()
2450 wc->n_blocks = le64_to_cpu(s.n_blocks); in writecache_ctr()
2452 offset = wc->n_blocks * sizeof(struct wc_memory_entry); in writecache_ctr()
2453 if (offset / sizeof(struct wc_memory_entry) != le64_to_cpu(sb(wc)->n_blocks)) { in writecache_ctr()
2463 data_size = wc->n_blocks * (size_t)wc->block_size; in writecache_ctr()
2464 if (!offset || (data_size / wc->block_size != wc->n_blocks) || in writecache_ctr()
2476 x = (uint64_t)wc->n_blocks * (100 - high_wm_percent); in writecache_ctr()
2480 x = (uint64_t)wc->n_blocks * (100 - low_wm_percent); in writecache_ctr()
2521 (unsigned long long)wc->n_blocks, (unsigned long long)wc->freelist_size, in writecache_status()