Lines Matching refs:result
65 int result; member
88 int result; in launch_zone_message() local
91 result = vdo_allocate(1, struct uds_request, __func__, &request); in launch_zone_message()
92 if (result != VDO_SUCCESS) in launch_zone_message()
93 return result; in launch_zone_message()
113 int result = launch_zone_message(message, zone, index); in enqueue_barrier_messages() local
115 VDO_ASSERT_LOG_ONLY((result == UDS_SUCCESS), "barrier message allocation"); in enqueue_barrier_messages()
181 int result; in finish_previous_chapter() local
187 result = writer->result; in finish_previous_chapter()
190 if (result != UDS_SUCCESS) in finish_previous_chapter()
191 return vdo_log_error_strerror(result, in finish_previous_chapter()
199 int result; in swap_open_chapter() local
201 result = finish_previous_chapter(zone->index, zone->newest_virtual_chapter); in swap_open_chapter()
202 if (result != UDS_SUCCESS) in swap_open_chapter()
203 return result; in swap_open_chapter()
231 int result; in announce_chapter_closed() local
242 result = launch_zone_message(zone_message, i, zone->index); in announce_chapter_closed()
243 if (result != UDS_SUCCESS) in announce_chapter_closed()
244 return result; in announce_chapter_closed()
252 int result; in open_next_chapter() local
263 result = swap_open_chapter(zone); in open_next_chapter()
264 if (result != UDS_SUCCESS) in open_next_chapter()
265 return result; in open_next_chapter()
275 result = announce_chapter_closed(zone, closed_chapter); in open_next_chapter()
276 if (result != UDS_SUCCESS) in open_next_chapter()
277 return result; in open_next_chapter()
344 int result; in search_sparse_cache_in_zone() local
349 result = uds_search_sparse_cache(zone, &request->record_name, &virtual_chapter, in search_sparse_cache_in_zone()
351 if ((result != UDS_SUCCESS) || (virtual_chapter == NO_CHAPTER)) in search_sparse_cache_in_zone()
352 return result; in search_sparse_cache_in_zone()
413 int result; in search_index_zone() local
419 result = uds_get_volume_index_record(zone->index->volume_index, in search_index_zone()
421 if (result != UDS_SUCCESS) in search_index_zone()
422 return result; in search_index_zone()
429 result = get_record_from_zone(zone, request, &found); in search_index_zone()
430 if (result != UDS_SUCCESS) in search_index_zone()
431 return result; in search_index_zone()
458 result = uds_set_volume_index_record_chapter(&record, chapter); in search_index_zone()
476 result = search_sparse_cache_in_zone(zone, request, NO_CHAPTER, in search_index_zone()
478 if (result != UDS_SUCCESS) in search_index_zone()
479 return result; in search_index_zone()
495 result = uds_put_volume_index_record(&record, chapter); in search_index_zone()
498 if (result == UDS_OVERFLOW) { in search_index_zone()
506 if (result != UDS_SUCCESS) in search_index_zone()
507 return result; in search_index_zone()
522 int result; in remove_from_index_zone() local
525 result = uds_get_volume_index_record(zone->index->volume_index, in remove_from_index_zone()
527 if (result != UDS_SUCCESS) in remove_from_index_zone()
528 return result; in remove_from_index_zone()
545 result = get_record_from_zone(zone, request, &found); in remove_from_index_zone()
546 if (result != UDS_SUCCESS) in remove_from_index_zone()
547 return result; in remove_from_index_zone()
562 result = uds_remove_volume_index_record(&record); in remove_from_index_zone()
563 if (result != UDS_SUCCESS) in remove_from_index_zone()
564 return result; in remove_from_index_zone()
578 int result; in dispatch_index_request() local
582 result = simulate_index_zone_barrier_message(zone, request); in dispatch_index_request()
583 if (result != UDS_SUCCESS) in dispatch_index_request()
584 return result; in dispatch_index_request()
592 result = search_index_zone(zone, request); in dispatch_index_request()
596 result = remove_from_index_zone(zone, request); in dispatch_index_request()
600 result = vdo_log_warning_strerror(UDS_INVALID_ARGUMENT, in dispatch_index_request()
606 return result; in dispatch_index_request()
612 int result; in execute_zone_request() local
616 result = dispatch_index_zone_control_request(request); in execute_zone_request()
617 if (result != UDS_SUCCESS) { in execute_zone_request()
618 vdo_log_error_strerror(result, "error executing message: %d", in execute_zone_request()
634 result = dispatch_index_request(index, request); in execute_zone_request()
635 if (result == UDS_QUEUED) { in execute_zone_request()
643 request->status = result; in execute_zone_request()
650 int result; in initialize_index_queues() local
654 result = uds_make_request_queue("indexW", &execute_zone_request, in initialize_index_queues()
656 if (result != UDS_SUCCESS) in initialize_index_queues()
657 return result; in initialize_index_queues()
662 result = uds_make_request_queue("triageW", &triage_request, in initialize_index_queues()
664 if (result != UDS_SUCCESS) in initialize_index_queues()
665 return result; in initialize_index_queues()
674 int result; in close_chapters() local
709 result = uds_discard_open_chapter(index->layout); in close_chapters()
710 if (result == UDS_SUCCESS) in close_chapters()
714 result = uds_close_open_chapter(writer->chapters, index->zone_count, in close_chapters()
725 writer->result = result; in close_chapters()
762 int result; in make_chapter_writer() local
767 result = vdo_allocate_extended(struct chapter_writer, index->zone_count, in make_chapter_writer()
770 if (result != VDO_SUCCESS) in make_chapter_writer()
771 return result; in make_chapter_writer()
777 result = vdo_allocate_cache_aligned(collated_records_size, "collated records", in make_chapter_writer()
779 if (result != VDO_SUCCESS) { in make_chapter_writer()
781 return result; in make_chapter_writer()
784 result = uds_make_open_chapter_index(&writer->open_chapter_index, in make_chapter_writer()
787 if (result != UDS_SUCCESS) { in make_chapter_writer()
789 return result; in make_chapter_writer()
797 result = vdo_create_thread(close_chapters, writer, "writer", &writer->thread); in make_chapter_writer()
798 if (result != VDO_SUCCESS) { in make_chapter_writer()
800 return result; in make_chapter_writer()
809 int result; in load_index() local
812 result = uds_load_index_state(index->layout, index); in load_index()
813 if (result != UDS_SUCCESS) in load_index()
827 int result; in rebuild_index_page_map() local
839 result = uds_get_volume_index_page(index->volume, chapter, in rebuild_index_page_map()
842 if (result != UDS_SUCCESS) { in rebuild_index_page_map()
843 return vdo_log_error_strerror(result, in rebuild_index_page_map()
867 int result; in replay_record() local
880 result = uds_get_volume_index_record(index->volume_index, name, &record); in replay_record()
881 if (result != UDS_SUCCESS) in replay_record()
882 return result; in replay_record()
910 result = uds_search_volume_page_cache_for_rebuild(index->volume, in replay_record()
914 if (result != UDS_SUCCESS) in replay_record()
915 return result; in replay_record()
926 result = uds_set_volume_index_record_chapter(&record, virtual_chapter); in replay_record()
934 result = uds_put_volume_index_record(&record, virtual_chapter); in replay_record()
937 if ((result == UDS_DUPLICATE_NAME) || (result == UDS_OVERFLOW)) { in replay_record()
942 return result; in replay_record()
973 int result; in replay_chapter() local
990 result = rebuild_index_page_map(index, virtual); in replay_chapter()
991 if (result != UDS_SUCCESS) { in replay_chapter()
992 return vdo_log_error_strerror(result, in replay_chapter()
1002 result = uds_get_volume_record_page(index->volume, physical_chapter, in replay_chapter()
1004 if (result != UDS_SUCCESS) { in replay_chapter()
1005 return vdo_log_error_strerror(result, "could not get page %d", in replay_chapter()
1015 result = replay_record(index, &name, virtual, sparse); in replay_chapter()
1016 if (result != UDS_SUCCESS) in replay_chapter()
1017 return result; in replay_chapter()
1026 int result; in replay_volume() local
1054 result = replay_chapter(index, virtual, will_be_sparse); in replay_volume()
1055 if (result != UDS_SUCCESS) in replay_volume()
1056 return result; in replay_volume()
1074 int result; in rebuild_index() local
1081 result = uds_find_volume_chapter_boundaries(index->volume, &lowest, &highest, in rebuild_index()
1083 if (result != UDS_SUCCESS) { in rebuild_index()
1084 return vdo_log_fatal_strerror(result, in rebuild_index()
1103 result = replay_volume(index); in rebuild_index()
1104 if (result != UDS_SUCCESS) in rebuild_index()
1105 return result; in rebuild_index()
1123 int result; in make_index_zone() local
1126 result = vdo_allocate(1, struct index_zone, "index zone", &zone); in make_index_zone()
1127 if (result != VDO_SUCCESS) in make_index_zone()
1128 return result; in make_index_zone()
1130 result = uds_make_open_chapter(index->volume->geometry, index->zone_count, in make_index_zone()
1132 if (result != UDS_SUCCESS) { in make_index_zone()
1134 return result; in make_index_zone()
1137 result = uds_make_open_chapter(index->volume->geometry, index->zone_count, in make_index_zone()
1139 if (result != UDS_SUCCESS) { in make_index_zone()
1141 return result; in make_index_zone()
1155 int result; in uds_make_index() local
1163 result = vdo_allocate_extended(struct uds_index, config->zone_count, in uds_make_index()
1165 if (result != VDO_SUCCESS) in uds_make_index()
1166 return result; in uds_make_index()
1170 result = uds_make_index_layout(config, new, &index->layout); in uds_make_index()
1171 if (result != UDS_SUCCESS) { in uds_make_index()
1173 return result; in uds_make_index()
1176 result = vdo_allocate(index->zone_count, struct index_zone *, "zones", in uds_make_index()
1178 if (result != VDO_SUCCESS) { in uds_make_index()
1180 return result; in uds_make_index()
1183 result = uds_make_volume(config, index->layout, &index->volume); in uds_make_index()
1184 if (result != UDS_SUCCESS) { in uds_make_index()
1186 return result; in uds_make_index()
1191 result = make_index_zone(index, z); in uds_make_index()
1192 if (result != UDS_SUCCESS) { in uds_make_index()
1194 return vdo_log_error_strerror(result, in uds_make_index()
1200 result = uds_make_volume_index(config, nonce, &index->volume_index); in uds_make_index()
1201 if (result != UDS_SUCCESS) { in uds_make_index()
1203 return vdo_log_error_strerror(result, "could not make volume index"); in uds_make_index()
1209 result = initialize_index_queues(index, config->geometry); in uds_make_index()
1210 if (result != UDS_SUCCESS) { in uds_make_index()
1212 return result; in uds_make_index()
1215 result = make_chapter_writer(index, &index->chapter_writer); in uds_make_index()
1216 if (result != UDS_SUCCESS) { in uds_make_index()
1218 return result; in uds_make_index()
1222 result = load_index(index); in uds_make_index()
1223 switch (result) { in uds_make_index()
1229 vdo_log_error_strerror(result, "index could not be loaded"); in uds_make_index()
1232 vdo_log_error_strerror(result, "index could not be loaded"); in uds_make_index()
1234 result = rebuild_index(index); in uds_make_index()
1235 if (result != UDS_SUCCESS) { in uds_make_index()
1236 vdo_log_error_strerror(result, in uds_make_index()
1244 if (result != UDS_SUCCESS) { in uds_make_index()
1246 return vdo_log_error_strerror(result, "fatal error in %s()", __func__); in uds_make_index()
1311 int result; in uds_save_index() local
1322 result = uds_save_index_state(index->layout, index); in uds_save_index()
1323 if (result != UDS_SUCCESS) { in uds_save_index()
1333 return result; in uds_save_index()