Lines Matching refs:sls
221 struct save_layout_sizes *sls) in compute_sizes() argument
226 memset(sls, 0, sizeof(*sls)); in compute_sizes()
227 sls->save_count = MAX_SAVES; in compute_sizes()
228 sls->block_size = UDS_BLOCK_SIZE; in compute_sizes()
229 sls->volume_blocks = geometry->bytes_per_volume / sls->block_size; in compute_sizes()
231 result = uds_compute_volume_index_save_blocks(config, sls->block_size, in compute_sizes()
232 &sls->volume_index_blocks); in compute_sizes()
236 sls->page_map_blocks = in compute_sizes()
238 sls->block_size); in compute_sizes()
239 sls->open_chapter_blocks = in compute_sizes()
241 sls->block_size); in compute_sizes()
242 sls->save_blocks = in compute_sizes()
243 1 + (sls->volume_index_blocks + sls->page_map_blocks + sls->open_chapter_blocks); in compute_sizes()
244 sls->sub_index_blocks = sls->volume_blocks + (sls->save_count * sls->save_blocks); in compute_sizes()
245 sls->total_blocks = 3 + sls->sub_index_blocks; in compute_sizes()
246 sls->total_size = sls->total_blocks * sls->block_size; in compute_sizes()
351 static void generate_super_block_data(struct save_layout_sizes *sls, in generate_super_block_data() argument
361 super->block_size = sls->block_size; in generate_super_block_data()
363 super->max_saves = sls->save_count; in generate_super_block_data()
364 super->open_chapter_blocks = sls->open_chapter_blocks; in generate_super_block_data()
365 super->page_map_blocks = sls->page_map_blocks; in generate_super_block_data()
391 struct save_layout_sizes *sls) in setup_sub_index() argument
399 .block_count = sls->sub_index_blocks, in setup_sub_index()
406 .block_count = sls->volume_blocks, in setup_sub_index()
411 next_block += sls->volume_blocks; in setup_sub_index()
413 for (i = 0; i < sls->save_count; i++) { in setup_sub_index()
416 .block_count = sls->save_blocks, in setup_sub_index()
421 next_block += sls->save_blocks; in setup_sub_index()
427 static void initialize_layout(struct index_layout *layout, struct save_layout_sizes *sls) in initialize_layout() argument
429 u64 next_block = layout->offset / sls->block_size; in initialize_layout()
431 layout->total_blocks = sls->total_blocks; in initialize_layout()
432 generate_super_block_data(sls, &layout->super); in initialize_layout()
447 setup_sub_index(layout, next_block, sls); in initialize_layout()
448 next_block += sls->sub_index_blocks; in initialize_layout()