Lines Matching full:super

86  * Super block version 2 is the first released version.
88 * Super block version 3 is the normal version used from RHEL 8.2 onwards.
90 * Super block versions 4 through 6 were incremental development versions and
93 * Super block version 7 is used for volumes which have been reduced in size by one chapter in
194 struct super_block_data super; member
215 static inline bool is_converted_super_block(struct super_block_data *super) in is_converted_super_block() argument
217 return super->version == 7; in is_converted_super_block()
332 return open_layout_reader(layout, region, -layout->super.start_offset, in open_region_reader()
347 return open_layout_writer(layout, region, -layout->super.start_offset, in open_region_writer()
352 struct super_block_data *super) in generate_super_block_data() argument
354 memset(super, 0, sizeof(*super)); in generate_super_block_data()
355 memcpy(super->magic_label, LAYOUT_MAGIC, MAGIC_SIZE); in generate_super_block_data()
356 create_unique_nonce_data(super->nonce_info); in generate_super_block_data()
358 super->nonce = generate_primary_nonce(super->nonce_info, in generate_super_block_data()
359 sizeof(super->nonce_info)); in generate_super_block_data()
360 super->version = SUPER_VERSION_CURRENT; in generate_super_block_data()
361 super->block_size = sls->block_size; in generate_super_block_data()
362 super->index_count = 1; 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()
366 super->volume_offset = 0; in generate_super_block_data()
367 super->start_offset = 0; in generate_super_block_data()
377 u64 primary_nonce = layout->super.nonce; in define_sub_index_nonce()
432 generate_super_block_data(sls, &layout->super); in initialize_layout()
634 reset_index_save_layout(isl, layout->super.page_map_blocks); in invalidate_old_save()
644 for (i = 0; i < layout->super.max_saves; i++) { in discard_index_state_data()
665 u16 region_count = 5 + layout->super.max_saves; in make_layout_region_table()
682 for (i = 0; i < layout->super.max_saves; i++) in make_layout_region_table()
687 if (is_converted_super_block(&layout->super)) { in make_layout_region_table()
691 sizeof(layout->super.volume_offset) - in make_layout_region_table()
692 sizeof(layout->super.start_offset)); in make_layout_region_table()
723 memcpy(buffer + offset, &layout->super.magic_label, MAGIC_SIZE); in write_layout_header()
725 memcpy(buffer + offset, &layout->super.nonce_info, NONCE_INFO_SIZE); in write_layout_header()
727 encode_u64_le(buffer, &offset, layout->super.nonce); in write_layout_header()
728 encode_u32_le(buffer, &offset, layout->super.version); in write_layout_header()
729 encode_u32_le(buffer, &offset, layout->super.block_size); in write_layout_header()
730 encode_u16_le(buffer, &offset, layout->super.index_count); in write_layout_header()
731 encode_u16_le(buffer, &offset, layout->super.max_saves); in write_layout_header()
733 encode_u64_le(buffer, &offset, layout->super.open_chapter_blocks); in write_layout_header()
734 encode_u64_le(buffer, &offset, layout->super.page_map_blocks); in write_layout_header()
736 if (is_converted_super_block(&layout->super)) { in write_layout_header()
737 encode_u64_le(buffer, &offset, layout->super.volume_offset); in write_layout_header()
738 encode_u64_le(buffer, &offset, layout->super.start_offset); in write_layout_header()
760 result = uds_write_config_contents(writer, config, layout->super.version); in write_uds_index_config()
866 for (i = 0; i < layout->super.max_saves; i++) { in find_latest_uds_index_save_slot()
968 for (i = 0; i < layout->super.max_saves; i++) { in select_oldest_index_save_layout()
981 struct super_block_data *super, in instantiate_index_save_layout() argument
1005 .block_count = super->page_map_blocks, in instantiate_index_save_layout()
1009 next_block += super->page_map_blocks; in instantiate_index_save_layout()
1012 super->page_map_blocks - in instantiate_index_save_layout()
1013 super->open_chapter_blocks); in instantiate_index_save_layout()
1029 .block_count = super->open_chapter_blocks, in instantiate_index_save_layout()
1034 next_block += super->open_chapter_blocks; in instantiate_index_save_layout()
1056 instantiate_index_save_layout(isl, &layout->super, layout->index.nonce, in setup_uds_index_save_slot()
1201 struct super_block_data *super = &layout->super; in read_super_block_data() local
1205 result = vdo_allocate(saved_size, u8, "super block data", &buffer); in read_super_block_data()
1215 memcpy(&super->magic_label, buffer, MAGIC_SIZE); in read_super_block_data()
1217 memcpy(&super->nonce_info, buffer + offset, NONCE_INFO_SIZE); in read_super_block_data()
1219 decode_u64_le(buffer, &offset, &super->nonce); in read_super_block_data()
1220 decode_u32_le(buffer, &offset, &super->version); in read_super_block_data()
1221 decode_u32_le(buffer, &offset, &super->block_size); in read_super_block_data()
1222 decode_u16_le(buffer, &offset, &super->index_count); in read_super_block_data()
1223 decode_u16_le(buffer, &offset, &super->max_saves); in read_super_block_data()
1225 decode_u64_le(buffer, &offset, &super->open_chapter_blocks); in read_super_block_data()
1226 decode_u64_le(buffer, &offset, &super->page_map_blocks); in read_super_block_data()
1228 if (is_converted_super_block(super)) { in read_super_block_data()
1229 decode_u64_le(buffer, &offset, &super->volume_offset); in read_super_block_data()
1230 decode_u64_le(buffer, &offset, &super->start_offset); in read_super_block_data()
1232 super->volume_offset = 0; in read_super_block_data()
1233 super->start_offset = 0; in read_super_block_data()
1238 if (memcmp(super->magic_label, LAYOUT_MAGIC, MAGIC_SIZE) != 0) in read_super_block_data()
1242 if ((super->version < SUPER_VERSION_MINIMUM) || in read_super_block_data()
1243 (super->version == 4) || (super->version == 5) || (super->version == 6) || in read_super_block_data()
1244 (super->version > SUPER_VERSION_MAXIMUM)) { in read_super_block_data()
1247 super->version); in read_super_block_data()
1250 if (super->volume_offset < super->start_offset) { in read_super_block_data()
1253 (unsigned long long) super->start_offset, in read_super_block_data()
1254 (unsigned long long) super->volume_offset); in read_super_block_data()
1258 if (super->index_count != 1) { in read_super_block_data()
1261 super->index_count); in read_super_block_data()
1264 if (generate_primary_nonce(super->nonce_info, sizeof(super->nonce_info)) != super->nonce) { in read_super_block_data()
1312 next_block += sil->volume.block_count + layout->super.volume_offset; in verify_sub_index()
1314 for (i = 0; i < layout->super.max_saves; i++) { in verify_sub_index()
1324 next_block -= layout->super.volume_offset; in verify_sub_index()
1339 result = vdo_allocate(layout->super.max_saves, struct index_save_layout, in reconstitute_layout()
1365 result = verify_region(&layout->seal, next_block + layout->super.volume_offset, in reconstitute_layout()
1383 struct super_block_data *super = &layout->super; in load_super_block() local
1401 if (super->block_size != block_size) { in load_super_block()
1405 super->block_size, block_size); in load_super_block()
1408 first_block -= (super->volume_offset - super->start_offset); in load_super_block()
1596 for (j = 0; j < layout->super.max_saves; j++) { in load_sub_index_regions()
1626 offset = layout->super.volume_offset - layout->super.start_offset; in verify_uds_index_config()
1755 layout->super.volume_offset - in uds_open_volume_bufio()
1756 layout->super.start_offset); in uds_open_volume_bufio()