Lines Matching full:result

305 	int result;  in compute_volume_sub_index_save_bytes()  local
307 result = compute_volume_sub_index_parameters(config, &params); in compute_volume_sub_index_save_bytes()
308 if (result != UDS_SUCCESS) in compute_volume_sub_index_save_bytes()
309 return result; in compute_volume_sub_index_save_bytes()
352 int result; in compute_volume_index_save_bytes() local
358 result = compute_volume_sub_index_save_bytes(&split.hook_config, &hook_bytes); in compute_volume_index_save_bytes()
359 if (result != UDS_SUCCESS) in compute_volume_index_save_bytes()
360 return result; in compute_volume_index_save_bytes()
362 result = compute_volume_sub_index_save_bytes(&split.non_hook_config, in compute_volume_index_save_bytes()
364 if (result != UDS_SUCCESS) in compute_volume_index_save_bytes()
365 return result; in compute_volume_index_save_bytes()
375 int result; in uds_compute_volume_index_save_blocks() local
377 result = compute_volume_index_save_bytes(config, &bytes); in uds_compute_volume_index_save_blocks()
378 if (result != UDS_SUCCESS) in uds_compute_volume_index_save_blocks()
379 return result; in uds_compute_volume_index_save_blocks()
391 int result; in flush_invalid_entries() local
393 result = uds_next_delta_index_entry(&record->delta_entry); in flush_invalid_entries()
394 if (result != UDS_SUCCESS) in flush_invalid_entries()
395 return result; in flush_invalid_entries()
408 result = uds_remove_delta_index_entry(&record->delta_entry); in flush_invalid_entries()
409 if (result != UDS_SUCCESS) in flush_invalid_entries()
410 return result; in flush_invalid_entries()
423 int result; in get_volume_index_entry() local
425 result = uds_start_delta_index_search(&sub_index->delta_index, list_number, 0, in get_volume_index_entry()
427 if (result != UDS_SUCCESS) in get_volume_index_entry()
428 return result; in get_volume_index_entry()
431 result = flush_invalid_entries(record, flush_range, in get_volume_index_entry()
433 if (result != UDS_SUCCESS) in get_volume_index_entry()
434 return result; in get_volume_index_entry()
437 result = uds_remember_delta_index_offset(&record->delta_entry); in get_volume_index_entry()
438 if (result != UDS_SUCCESS) in get_volume_index_entry()
439 return result; in get_volume_index_entry()
447 result = flush_invalid_entries(&other_record, flush_range, in get_volume_index_entry()
449 if (result != UDS_SUCCESS) in get_volume_index_entry()
450 return result; in get_volume_index_entry()
456 result = uds_get_delta_entry_collision(&other_record.delta_entry, in get_volume_index_entry()
458 if (result != UDS_SUCCESS) in get_volume_index_entry()
459 return result; in get_volume_index_entry()
468 result = flush_invalid_entries(&other_record, flush_range, in get_volume_index_entry()
470 if (result != UDS_SUCCESS) in get_volume_index_entry()
471 return result; in get_volume_index_entry()
484 int result; in get_volume_sub_index_record() local
504 result = get_volume_index_entry(record, delta_list_number, address, in get_volume_sub_index_record()
511 result = uds_get_delta_index_entry(&sub_index->delta_index, in get_volume_sub_index_record()
516 if (result != UDS_SUCCESS) in get_volume_sub_index_record()
517 return result; in get_volume_sub_index_record()
535 int result; in uds_get_volume_index_record() local
548 result = get_volume_sub_index_record(&volume_index->vi_hook, name, in uds_get_volume_index_record()
554 result = get_volume_sub_index_record(&volume_index->vi_non_hook, name, in uds_get_volume_index_record()
558 return result; in uds_get_volume_index_record()
563 int result; in uds_put_volume_index_record() local
580 result = uds_put_delta_index_entry(&record->delta_entry, address, in uds_put_volume_index_record()
586 switch (result) { in uds_put_volume_index_record()
601 return result; in uds_put_volume_index_record()
606 int result; in uds_remove_volume_index_record() local
616 result = uds_remove_delta_index_entry(&record->delta_entry); in uds_remove_volume_index_record()
619 return result; in uds_remove_volume_index_record()
713 int result; in uds_set_volume_index_record_chapter() local
732 result = uds_set_delta_entry_value(&record->delta_entry, in uds_set_volume_index_record_chapter()
737 if (result != UDS_SUCCESS) in uds_set_volume_index_record_chapter()
738 return result; in uds_set_volume_index_record_chapter()
747 int result; in lookup_volume_sub_index_name() local
757 result = uds_get_delta_index_entry(&sub_index->delta_index, delta_list_number, in lookup_volume_sub_index_name()
759 if (result != UDS_SUCCESS) in lookup_volume_sub_index_name()
810 int result; in start_restoring_volume_sub_index() local
820 result = uds_read_from_buffered_reader(readers[i], buffer, in start_restoring_volume_sub_index()
822 if (result != UDS_SUCCESS) { in start_restoring_volume_sub_index()
823 return vdo_log_warning_strerror(result, in start_restoring_volume_sub_index()
835 result = VDO_ASSERT(offset == sizeof(buffer), in start_restoring_volume_sub_index()
838 if (result != VDO_SUCCESS) in start_restoring_volume_sub_index()
839 result = UDS_CORRUPT_DATA; in start_restoring_volume_sub_index()
873 result = uds_read_from_buffered_reader(readers[i], decoded, in start_restoring_volume_sub_index()
875 if (result != UDS_SUCCESS) { in start_restoring_volume_sub_index()
876 return vdo_log_warning_strerror(result, in start_restoring_volume_sub_index()
891 result = uds_start_restoring_delta_index(&sub_index->delta_index, readers, in start_restoring_volume_sub_index()
893 if (result != UDS_SUCCESS) in start_restoring_volume_sub_index()
894 return vdo_log_warning_strerror(result, "restoring delta index failed"); in start_restoring_volume_sub_index()
904 int result; in start_restoring_volume_index() local
916 result = uds_read_from_buffered_reader(buffered_readers[i], buffer, in start_restoring_volume_index()
918 if (result != UDS_SUCCESS) { in start_restoring_volume_index()
919 return vdo_log_warning_strerror(result, in start_restoring_volume_index()
927 result = VDO_ASSERT(offset == sizeof(buffer), in start_restoring_volume_index()
930 if (result != VDO_SUCCESS) in start_restoring_volume_index()
931 result = UDS_CORRUPT_DATA; in start_restoring_volume_index()
948 result = start_restoring_volume_sub_index(&volume_index->vi_non_hook, in start_restoring_volume_index()
950 if (result != UDS_SUCCESS) in start_restoring_volume_index()
951 return result; in start_restoring_volume_index()
969 int result; in finish_restoring_volume_index() local
971 result = finish_restoring_volume_sub_index(&volume_index->vi_non_hook, in finish_restoring_volume_index()
973 if ((result == UDS_SUCCESS) && has_sparse(volume_index)) { in finish_restoring_volume_index()
974 result = finish_restoring_volume_sub_index(&volume_index->vi_hook, in finish_restoring_volume_index()
979 return result; in finish_restoring_volume_index()
985 int result; in uds_load_volume_index() local
988 result = start_restoring_volume_index(volume_index, readers, reader_count); in uds_load_volume_index()
989 if (result != UDS_SUCCESS) in uds_load_volume_index()
990 return result; in uds_load_volume_index()
992 result = finish_restoring_volume_index(volume_index, readers, reader_count); in uds_load_volume_index()
993 if (result != UDS_SUCCESS) { in uds_load_volume_index()
995 return result; in uds_load_volume_index()
999 result = uds_check_guard_delta_lists(readers, reader_count); in uds_load_volume_index()
1000 if (result != UDS_SUCCESS) in uds_load_volume_index()
1003 return result; in uds_load_volume_index()
1010 int result; in start_saving_volume_sub_index() local
1026 result = VDO_ASSERT(offset == sizeof(struct sub_index_data), in start_saving_volume_sub_index()
1029 if (result != VDO_SUCCESS) in start_saving_volume_sub_index()
1030 return result; in start_saving_volume_sub_index()
1032 result = uds_write_to_buffered_writer(buffered_writer, buffer, offset); in start_saving_volume_sub_index()
1033 if (result != UDS_SUCCESS) in start_saving_volume_sub_index()
1034 return vdo_log_warning_strerror(result, in start_saving_volume_sub_index()
1041 result = uds_write_to_buffered_writer(buffered_writer, encoded, in start_saving_volume_sub_index()
1043 if (result != UDS_SUCCESS) { in start_saving_volume_sub_index()
1044 return vdo_log_warning_strerror(result, in start_saving_volume_sub_index()
1059 int result; in start_saving_volume_index() local
1069 result = VDO_ASSERT(offset == sizeof(struct volume_index_data), in start_saving_volume_index()
1072 if (result != VDO_SUCCESS) in start_saving_volume_index()
1073 return result; in start_saving_volume_index()
1075 result = uds_write_to_buffered_writer(writer, buffer, offset); in start_saving_volume_index()
1076 if (result != UDS_SUCCESS) { in start_saving_volume_index()
1077 vdo_log_warning_strerror(result, "failed to write volume index header"); in start_saving_volume_index()
1078 return result; in start_saving_volume_index()
1081 result = start_saving_volume_sub_index(&volume_index->vi_non_hook, zone_number, in start_saving_volume_index()
1083 if (result != UDS_SUCCESS) in start_saving_volume_index()
1084 return result; in start_saving_volume_index()
1099 int result; in finish_saving_volume_index() local
1101 result = finish_saving_volume_sub_index(&volume_index->vi_non_hook, zone_number); in finish_saving_volume_index()
1102 if ((result == UDS_SUCCESS) && has_sparse(volume_index)) in finish_saving_volume_index()
1103 result = finish_saving_volume_sub_index(&volume_index->vi_hook, zone_number); in finish_saving_volume_index()
1104 return result; in finish_saving_volume_index()
1110 int result = UDS_SUCCESS; in uds_save_volume_index() local
1114 result = start_saving_volume_index(volume_index, zone, writers[zone]); in uds_save_volume_index()
1115 if (result != UDS_SUCCESS) in uds_save_volume_index()
1118 result = finish_saving_volume_index(volume_index, zone); in uds_save_volume_index()
1119 if (result != UDS_SUCCESS) in uds_save_volume_index()
1122 result = uds_write_guard_delta_list(writers[zone]); in uds_save_volume_index()
1123 if (result != UDS_SUCCESS) in uds_save_volume_index()
1126 result = uds_flush_buffered_writer(writers[zone]); in uds_save_volume_index()
1127 if (result != UDS_SUCCESS) in uds_save_volume_index()
1131 return result; in uds_save_volume_index()
1181 int result; in initialize_volume_sub_index() local
1183 result = compute_volume_sub_index_parameters(config, &params); in initialize_volume_sub_index()
1184 if (result != UDS_SUCCESS) in initialize_volume_sub_index()
1185 return result; in initialize_volume_sub_index()
1197 result = uds_initialize_delta_index(&sub_index->delta_index, zone_count, in initialize_volume_sub_index()
1201 if (result != UDS_SUCCESS) in initialize_volume_sub_index()
1202 return result; in initialize_volume_sub_index()
1214 result = vdo_allocate(params.list_count, u64, "first chapter to flush", in initialize_volume_sub_index()
1216 if (result != VDO_SUCCESS) in initialize_volume_sub_index()
1217 return result; in initialize_volume_sub_index()
1229 int result; in uds_make_volume_index() local
1231 result = vdo_allocate(1, struct volume_index, "volume index", &volume_index); in uds_make_volume_index()
1232 if (result != VDO_SUCCESS) in uds_make_volume_index()
1233 return result; in uds_make_volume_index()
1238 result = initialize_volume_sub_index(config, volume_nonce, 'm', in uds_make_volume_index()
1240 if (result != UDS_SUCCESS) { in uds_make_volume_index()
1242 return result; in uds_make_volume_index()
1252 result = vdo_allocate(config->zone_count, struct volume_index_zone, in uds_make_volume_index()
1254 if (result != VDO_SUCCESS) { in uds_make_volume_index()
1256 return result; in uds_make_volume_index()
1263 result = initialize_volume_sub_index(&split.non_hook_config, volume_nonce, 'd', in uds_make_volume_index()
1265 if (result != UDS_SUCCESS) { in uds_make_volume_index()
1267 return vdo_log_error_strerror(result, in uds_make_volume_index()
1271 result = initialize_volume_sub_index(&split.hook_config, volume_nonce, 's', in uds_make_volume_index()
1273 if (result != UDS_SUCCESS) { in uds_make_volume_index()
1275 return vdo_log_error_strerror(result, in uds_make_volume_index()