Lines Matching full:result

179 	int result;  in vdo_validate_header()  local
188 result = validate_version(expected_header->version, actual_header->version, in vdo_validate_header()
190 if (result != VDO_SUCCESS) in vdo_validate_header()
191 return result; in vdo_validate_header()
304 int result; in vdo_parse_geometry_block() local
312 result = vdo_validate_header(&GEOMETRY_BLOCK_HEADER_4_0, &header, in vdo_parse_geometry_block()
315 result = vdo_validate_header(&GEOMETRY_BLOCK_HEADER_5_0, &header, in vdo_parse_geometry_block()
318 if (result != VDO_SUCCESS) in vdo_parse_geometry_block()
319 return result; in vdo_parse_geometry_block()
323 result = VDO_ASSERT(header.size == offset + sizeof(u32), in vdo_parse_geometry_block()
325 if (result != VDO_SUCCESS) in vdo_parse_geometry_block()
326 return result; in vdo_parse_geometry_block()
373 int result; in decode_block_map_state_2_0() local
376 result = vdo_validate_header(&VDO_BLOCK_MAP_HEADER_2_0, &header, true, __func__); in decode_block_map_state_2_0()
377 if (result != VDO_SUCCESS) in decode_block_map_state_2_0()
378 return result; in decode_block_map_state_2_0()
383 result = VDO_ASSERT(flat_page_origin == VDO_BLOCK_MAP_FLAT_PAGE_ORIGIN, in decode_block_map_state_2_0()
387 if (result != VDO_SUCCESS) in decode_block_map_state_2_0()
388 return result; in decode_block_map_state_2_0()
391 result = VDO_ASSERT(flat_page_count == 0, in decode_block_map_state_2_0()
394 if (result != VDO_SUCCESS) in decode_block_map_state_2_0()
395 return result; in decode_block_map_state_2_0()
400 result = VDO_ASSERT(VDO_BLOCK_MAP_HEADER_2_0.size == *offset - initial_offset, in decode_block_map_state_2_0()
402 if (result != VDO_SUCCESS) in decode_block_map_state_2_0()
403 return result; in decode_block_map_state_2_0()
487 * @state: A pointer to a recovery journal state to hold the result of a successful decode.
495 int result; in decode_recovery_journal_state_7_0() local
501 result = vdo_validate_header(&VDO_RECOVERY_JOURNAL_HEADER_7_0, &header, true, in decode_recovery_journal_state_7_0()
503 if (result != VDO_SUCCESS) in decode_recovery_journal_state_7_0()
504 return result; in decode_recovery_journal_state_7_0()
511 result = VDO_ASSERT(VDO_RECOVERY_JOURNAL_HEADER_7_0.size == *offset - initial_offset, in decode_recovery_journal_state_7_0()
513 if (result != VDO_SUCCESS) in decode_recovery_journal_state_7_0()
514 return result; in decode_recovery_journal_state_7_0()
580 int result; in decode_slab_depot_state_2_0() local
588 result = vdo_validate_header(&VDO_SLAB_DEPOT_HEADER_2_0, &header, true, in decode_slab_depot_state_2_0()
590 if (result != VDO_SUCCESS) in decode_slab_depot_state_2_0()
591 return result; in decode_slab_depot_state_2_0()
619 result = VDO_ASSERT(VDO_SLAB_DEPOT_HEADER_2_0.size == *offset - initial_offset, in decode_slab_depot_state_2_0()
621 if (result != VDO_SUCCESS) in decode_slab_depot_state_2_0()
622 return result; in decode_slab_depot_state_2_0()
785 int result; in allocate_partition() local
787 result = vdo_allocate(1, struct partition, __func__, &partition); in allocate_partition()
788 if (result != VDO_SUCCESS) in allocate_partition()
789 return result; in allocate_partition()
814 int result; in make_partition() local
826 result = vdo_get_partition(layout, id, NULL); in make_partition()
827 if (result != VDO_UNKNOWN_PARTITION) in make_partition()
832 result = allocate_partition(layout, id, offset, size); in make_partition()
833 if (result != VDO_SUCCESS) in make_partition()
834 return result; in make_partition()
860 int result; in vdo_initialize_layout() local
877 result = make_partition(layout, VDO_BLOCK_MAP_PARTITION, block_map_blocks, true); in vdo_initialize_layout()
878 if (result != VDO_SUCCESS) { in vdo_initialize_layout()
880 return result; in vdo_initialize_layout()
883 result = make_partition(layout, VDO_SLAB_SUMMARY_PARTITION, summary_blocks, in vdo_initialize_layout()
885 if (result != VDO_SUCCESS) { in vdo_initialize_layout()
887 return result; in vdo_initialize_layout()
890 result = make_partition(layout, VDO_RECOVERY_JOURNAL_PARTITION, journal_blocks, in vdo_initialize_layout()
892 if (result != VDO_SUCCESS) { in vdo_initialize_layout()
894 return result; in vdo_initialize_layout()
897 result = make_partition(layout, VDO_SLAB_DEPOT_PARTITION, 0, true); in vdo_initialize_layout()
898 if (result != VDO_SUCCESS) in vdo_initialize_layout()
901 return result; in vdo_initialize_layout()
956 int result = vdo_get_partition(layout, id, &partition); in vdo_get_known_partition() local
958 VDO_ASSERT_LOG_ONLY(result == VDO_SUCCESS, "layout has expected partition: %u", id); in vdo_get_known_partition()
1005 int result; in decode_layout() local
1009 result = vdo_validate_header(&VDO_LAYOUT_HEADER_3_0, &header, false, __func__); in decode_layout()
1010 if (result != VDO_SUCCESS) in decode_layout()
1011 return result; in decode_layout()
1023 result = VDO_ASSERT(sizeof(struct layout_3_0) == *offset - initial_offset, in decode_layout()
1025 if (result != VDO_SUCCESS) in decode_layout()
1026 return result; in decode_layout()
1048 result = allocate_partition(layout, id, partition_offset, count); in decode_layout()
1049 if (result != VDO_SUCCESS) { in decode_layout()
1051 return result; in decode_layout()
1057 result = vdo_get_partition(layout, REQUIRED_PARTITIONS[i], &partition); in decode_layout()
1058 if (result != VDO_SUCCESS) { in decode_layout()
1060 return vdo_log_error_strerror(result, in decode_layout()
1166 int result; in decode_vdo_component() local
1169 result = validate_version(version, VDO_COMPONENT_DATA_41_0, in decode_vdo_component()
1171 if (result != VDO_SUCCESS) in decode_vdo_component()
1172 return result; in decode_vdo_component()
1194 int result; in vdo_validate_config() local
1196 result = VDO_ASSERT(config->slab_size > 0, "slab size unspecified"); in vdo_validate_config()
1197 if (result != VDO_SUCCESS) in vdo_validate_config()
1198 return result; in vdo_validate_config()
1200 result = VDO_ASSERT(is_power_of_2(config->slab_size), in vdo_validate_config()
1202 if (result != VDO_SUCCESS) in vdo_validate_config()
1203 return result; in vdo_validate_config()
1205 result = VDO_ASSERT(config->slab_size <= (1 << MAX_VDO_SLAB_BITS), in vdo_validate_config()
1208 if (result != VDO_SUCCESS) in vdo_validate_config()
1209 return result; in vdo_validate_config()
1211 result = VDO_ASSERT(config->slab_journal_blocks <= config->slab_size, in vdo_validate_config()
1213 if (result != VDO_SUCCESS) in vdo_validate_config()
1214 return result; in vdo_validate_config()
1216 result = vdo_configure_slab(config->slab_size, config->slab_journal_blocks, in vdo_validate_config()
1218 if (result != VDO_SUCCESS) in vdo_validate_config()
1219 return result; in vdo_validate_config()
1221 result = VDO_ASSERT((slab_config.data_blocks >= 1), in vdo_validate_config()
1223 if (result != VDO_SUCCESS) in vdo_validate_config()
1224 return result; in vdo_validate_config()
1226 result = VDO_ASSERT(config->physical_blocks > 0, "physical blocks unspecified"); in vdo_validate_config()
1227 if (result != VDO_SUCCESS) in vdo_validate_config()
1228 return result; in vdo_validate_config()
1230 result = VDO_ASSERT(config->physical_blocks <= MAXIMUM_VDO_PHYSICAL_BLOCKS, in vdo_validate_config()
1234 if (result != VDO_SUCCESS) in vdo_validate_config()
1245 result = VDO_ASSERT((config->logical_blocks > 0), in vdo_validate_config()
1247 if (result != VDO_SUCCESS) in vdo_validate_config()
1248 return result; in vdo_validate_config()
1258 result = VDO_ASSERT(config->logical_blocks <= MAXIMUM_VDO_LOGICAL_BLOCKS, in vdo_validate_config()
1260 if (result != VDO_SUCCESS) in vdo_validate_config()
1261 return result; in vdo_validate_config()
1263 result = VDO_ASSERT(config->recovery_journal_size > 0, in vdo_validate_config()
1265 if (result != VDO_SUCCESS) in vdo_validate_config()
1266 return result; in vdo_validate_config()
1268 result = VDO_ASSERT(is_power_of_2(config->recovery_journal_size), in vdo_validate_config()
1270 if (result != VDO_SUCCESS) in vdo_validate_config()
1271 return result; in vdo_validate_config()
1273 return result; in vdo_validate_config()
1302 int result; in decode_components() local
1306 result = decode_layout(buffer, offset, vdo_get_data_region_start(*geometry) + 1, in decode_components()
1308 if (result != VDO_SUCCESS) in decode_components()
1309 return result; in decode_components()
1311 result = decode_recovery_journal_state_7_0(buffer, offset, in decode_components()
1313 if (result != VDO_SUCCESS) in decode_components()
1314 return result; in decode_components()
1316 result = decode_slab_depot_state_2_0(buffer, offset, &states->slab_depot); in decode_components()
1317 if (result != VDO_SUCCESS) in decode_components()
1318 return result; in decode_components()
1320 result = decode_block_map_state_2_0(buffer, offset, &states->block_map); in decode_components()
1321 if (result != VDO_SUCCESS) in decode_components()
1322 return result; in decode_components()
1340 int result; in vdo_decode_component_states() local
1348 result = validate_version(VDO_VOLUME_VERSION_67_0, states->volume_version, in vdo_decode_component_states()
1350 if (result != VDO_SUCCESS) in vdo_decode_component_states()
1351 return result; in vdo_decode_component_states()
1353 result = decode_components(buffer, &offset, geometry, states); in vdo_decode_component_states()
1354 if (result != VDO_SUCCESS) in vdo_decode_component_states()
1357 return result; in vdo_decode_component_states()
1433 int result; in vdo_decode_super_block() local
1439 result = vdo_validate_header(&SUPER_BLOCK_HEADER_12_0, &header, false, __func__); in vdo_decode_super_block()
1440 if (result != VDO_SUCCESS) in vdo_decode_super_block()
1441 return result; in vdo_decode_super_block()
1459 result = VDO_ASSERT(offset == VDO_SUPER_BLOCK_FIXED_SIZE + VDO_COMPONENT_DATA_SIZE, in vdo_decode_super_block()
1461 if (result != VDO_SUCCESS) in vdo_decode_super_block()
1462 return result; in vdo_decode_super_block()