Lines Matching refs:result

259 	int result;  in put_page_in_cache()  local
262 result = VDO_ASSERT((page->read_pending), "page to install has a pending read"); in put_page_in_cache()
263 if (result != VDO_SUCCESS) in put_page_in_cache()
264 return result; in put_page_in_cache()
285 int result; in cancel_page_in_cache() local
288 result = VDO_ASSERT((page->read_pending), "page to install has a pending read"); in cancel_page_in_cache()
289 if (result != VDO_SUCCESS) in cancel_page_in_cache()
426 int result; in init_chapter_index_page() local
428 result = uds_initialize_chapter_index_page(chapter_index_page, geometry, in init_chapter_index_page()
431 return result; in init_chapter_index_page()
433 if (result != UDS_SUCCESS) { in init_chapter_index_page()
434 return vdo_log_error_strerror(result, in init_chapter_index_page()
482 int result; in search_record_page() local
485 result = memcmp(name, &record->name, UDS_RECORD_NAME_SIZE); in search_record_page()
486 if (result == 0) { in search_record_page()
493 node = ((2 * node) + ((result < 0) ? 1 : 2)); in search_record_page()
509 int result; in search_page() local
521 result = uds_search_chapter_index_page(&page->index_page, in search_page()
525 if (result != UDS_SUCCESS) in search_page()
526 return result; in search_page()
547 int result; in process_entry() local
560 result = -PTR_ERR(page_data); in process_entry()
561 vdo_log_warning_strerror(result, in process_entry()
565 return result; in process_entry()
575 result = initialize_index_page(volume, page_number, page); in process_entry()
576 if (result != UDS_SUCCESS) { in process_entry()
579 return result; in process_entry()
583 result = put_page_in_cache(&volume->page_cache, page_number, page); in process_entry()
584 if (result != UDS_SUCCESS) { in process_entry()
587 return result; in process_entry()
591 while ((request != NULL) && (result == UDS_SUCCESS)) { in process_entry()
592 result = search_page(page, volume, request, page_number); in process_entry()
596 return result; in process_entry()
600 int result) in release_queued_requests() argument
609 request->status = result; in release_queued_requests()
631 int result; in read_thread_function() local
637 result = process_entry(volume, queue_entry); in read_thread_function()
638 release_queued_requests(volume, queue_entry, result); in read_thread_function()
696 int result = UDS_SUCCESS; in read_page_locked() local
703 result = -PTR_ERR(page_data); in read_page_locked()
704 vdo_log_warning_strerror(result, in read_page_locked()
708 return result; in read_page_locked()
712 result = initialize_index_page(volume, physical_page, page); in read_page_locked()
713 if (result != UDS_SUCCESS) { in read_page_locked()
717 return result; in read_page_locked()
721 result = put_page_in_cache(&volume->page_cache, physical_page, page); in read_page_locked()
722 if (result != UDS_SUCCESS) { in read_page_locked()
725 return result; in read_page_locked()
736 int result; in get_volume_page_locked() local
741 result = read_page_locked(volume, physical_page, &page); in get_volume_page_locked()
742 if (result != UDS_SUCCESS) in get_volume_page_locked()
743 return result; in get_volume_page_locked()
809 int result; in get_volume_page() local
813 result = get_volume_page_locked(volume, physical_page, page_ptr); in get_volume_page()
815 return result; in get_volume_page()
821 int result; in uds_get_volume_record_page() local
824 result = get_volume_page(volume, chapter, page_number, &page); in uds_get_volume_record_page()
825 if (result == UDS_SUCCESS) in uds_get_volume_record_page()
827 return result; in uds_get_volume_record_page()
833 int result; in uds_get_volume_index_page() local
836 result = get_volume_page(volume, chapter, page_number, &page); in uds_get_volume_index_page()
837 if (result == UDS_SUCCESS) in uds_get_volume_index_page()
839 return result; in uds_get_volume_index_page()
850 int result; in search_cached_index_page() local
863 result = get_volume_page_protected(volume, request, physical_page, &page); in search_cached_index_page()
864 if (result != UDS_SUCCESS) { in search_cached_index_page()
866 return result; in search_cached_index_page()
869 result = uds_search_chapter_index_page(&page->index_page, volume->geometry, in search_cached_index_page()
873 return result; in search_cached_index_page()
885 int result; in uds_search_cached_record_page() local
892 result = VDO_ASSERT(record_page_number < geometry->record_pages_per_chapter, in uds_search_cached_record_page()
895 if (result != VDO_SUCCESS) in uds_search_cached_record_page()
896 return result; in uds_search_cached_record_page()
910 result = get_volume_page_protected(volume, request, physical_page, &record_page); in uds_search_cached_record_page()
911 if (result != UDS_SUCCESS) { in uds_search_cached_record_page()
913 return result; in uds_search_cached_record_page()
936 int result; in uds_read_chapter_index_from_volume() local
949 result = -PTR_ERR(index_page); in uds_read_chapter_index_from_volume()
950 vdo_log_warning_strerror(result, in uds_read_chapter_index_from_volume()
953 return result; in uds_read_chapter_index_from_volume()
956 result = init_chapter_index_page(volume, index_page, physical_chapter, i, in uds_read_chapter_index_from_volume()
958 if (result != UDS_SUCCESS) in uds_read_chapter_index_from_volume()
959 return result; in uds_read_chapter_index_from_volume()
968 int result; in uds_search_volume_page_cache() local
981 result = search_cached_index_page(volume, request, physical_chapter, in uds_search_volume_page_cache()
984 if (result != UDS_SUCCESS) in uds_search_volume_page_cache()
985 return result; in uds_search_volume_page_cache()
996 int result; in uds_search_volume_page_cache_for_rebuild() local
1008 result = get_volume_page(volume, physical_chapter, index_page_number, &page); in uds_search_volume_page_cache_for_rebuild()
1009 if (result != UDS_SUCCESS) in uds_search_volume_page_cache_for_rebuild()
1010 return result; in uds_search_volume_page_cache_for_rebuild()
1012 result = uds_search_chapter_index_page(&page->index_page, geometry, name, in uds_search_volume_page_cache_for_rebuild()
1014 if (result != UDS_SUCCESS) in uds_search_volume_page_cache_for_rebuild()
1015 return result; in uds_search_volume_page_cache_for_rebuild()
1021 result = get_volume_page(volume, physical_chapter, page_number, &page); in uds_search_volume_page_cache_for_rebuild()
1022 if (result != UDS_SUCCESS) in uds_search_volume_page_cache_for_rebuild()
1023 return result; in uds_search_volume_page_cache_for_rebuild()
1068 int result; in donate_index_page_locked() local
1076 result = init_chapter_index_page(volume, dm_bufio_get_block_data(page_buffer), in donate_index_page_locked()
1079 if (result != UDS_SUCCESS) { in donate_index_page_locked()
1082 return result; in donate_index_page_locked()
1085 result = put_page_in_cache(&volume->page_cache, physical_page, page); in donate_index_page_locked()
1086 if (result != UDS_SUCCESS) { in donate_index_page_locked()
1089 return result; in donate_index_page_locked()
1111 int result; in write_index_pages() local
1120 result = uds_pack_open_chapter_index_page(chapter_index, page_data, in write_index_pages()
1123 if (result != UDS_SUCCESS) { in write_index_pages()
1125 return vdo_log_warning_strerror(result, in write_index_pages()
1144 result = donate_index_page_locked(volume, physical_chapter_number, in write_index_pages()
1147 if (result != UDS_SUCCESS) { in write_index_pages()
1149 return result; in write_index_pages()
1183 int result; in encode_record_page() local
1196 result = uds_radix_sort(volume->radix_sorter, (const u8 **) record_pointers, in encode_record_page()
1198 if (result != UDS_SUCCESS) in encode_record_page()
1199 return result; in encode_record_page()
1220 int result; in write_record_pages() local
1228 result = encode_record_page(volume, next_record, page_data); in write_record_pages()
1229 if (result != UDS_SUCCESS) { in write_record_pages()
1231 return vdo_log_warning_strerror(result, in write_record_pages()
1247 int result; in uds_write_chapter() local
1252 result = write_index_pages(volume, physical_chapter_number, chapter_index); in uds_write_chapter()
1253 if (result != UDS_SUCCESS) in uds_write_chapter()
1254 return result; in uds_write_chapter()
1256 result = write_record_pages(volume, physical_chapter_number, records); in uds_write_chapter()
1257 if (result != UDS_SUCCESS) in uds_write_chapter()
1258 return result; in uds_write_chapter()
1260 result = -dm_bufio_write_dirty_buffers(volume->client); in uds_write_chapter()
1261 if (result != UDS_SUCCESS) in uds_write_chapter()
1262 vdo_log_error_strerror(result, "cannot sync chapter to volume"); in uds_write_chapter()
1264 return result; in uds_write_chapter()
1282 int result; in probe_chapter() local
1284 result = uds_get_volume_index_page(volume, chapter_number, i, &page); in probe_chapter()
1285 if (result != UDS_SUCCESS) in probe_chapter()
1311 result = uds_validate_chapter_index_page(page, geometry); in probe_chapter()
1312 if (result != UDS_SUCCESS) in probe_chapter()
1470 int result; in uds_replace_volume_storage() local
1473 result = uds_replace_index_layout_storage(layout, bdev); in uds_replace_volume_storage()
1474 if (result != UDS_SUCCESS) in uds_replace_volume_storage()
1475 return result; in uds_replace_volume_storage()
1496 int result; in initialize_page_cache() local
1504 result = VDO_ASSERT((cache->cache_slots <= VOLUME_CACHE_MAX_ENTRIES), in initialize_page_cache()
1507 if (result != VDO_SUCCESS) in initialize_page_cache()
1508 return result; in initialize_page_cache()
1510 result = vdo_allocate(VOLUME_CACHE_MAX_QUEUED_READS, struct queued_read, in initialize_page_cache()
1512 if (result != VDO_SUCCESS) in initialize_page_cache()
1513 return result; in initialize_page_cache()
1515 result = vdo_allocate(cache->zone_count, struct search_pending_counter, in initialize_page_cache()
1517 if (result != VDO_SUCCESS) in initialize_page_cache()
1518 return result; in initialize_page_cache()
1520 result = vdo_allocate(cache->indexable_pages, u16, "page cache index", in initialize_page_cache()
1522 if (result != VDO_SUCCESS) in initialize_page_cache()
1523 return result; in initialize_page_cache()
1525 result = vdo_allocate(cache->cache_slots, struct cached_page, "page cache cache", in initialize_page_cache()
1527 if (result != VDO_SUCCESS) in initialize_page_cache()
1528 return result; in initialize_page_cache()
1547 int result; in uds_make_volume() local
1549 result = vdo_allocate(1, struct volume, "volume", &volume); in uds_make_volume()
1550 if (result != VDO_SUCCESS) in uds_make_volume()
1551 return result; in uds_make_volume()
1555 result = uds_copy_index_geometry(config->geometry, &volume->geometry); in uds_make_volume()
1556 if (result != UDS_SUCCESS) { in uds_make_volume()
1558 return vdo_log_warning_strerror(result, in uds_make_volume()
1572 result = uds_open_volume_bufio(layout, geometry->bytes_per_page, in uds_make_volume()
1574 if (result != UDS_SUCCESS) { in uds_make_volume()
1576 return result; in uds_make_volume()
1579 result = uds_make_radix_sorter(geometry->records_per_page, in uds_make_volume()
1581 if (result != UDS_SUCCESS) { in uds_make_volume()
1583 return result; in uds_make_volume()
1586 result = vdo_allocate(geometry->records_per_page, in uds_make_volume()
1589 if (result != VDO_SUCCESS) { in uds_make_volume()
1591 return result; in uds_make_volume()
1597 result = uds_make_sparse_cache(geometry, config->cache_chapters, in uds_make_volume()
1600 if (result != UDS_SUCCESS) { in uds_make_volume()
1602 return result; in uds_make_volume()
1609 result = initialize_page_cache(&volume->page_cache, geometry, in uds_make_volume()
1611 if (result != UDS_SUCCESS) { in uds_make_volume()
1613 return result; in uds_make_volume()
1617 result = uds_make_index_page_map(geometry, &volume->index_page_map); in uds_make_volume()
1618 if (result != UDS_SUCCESS) { in uds_make_volume()
1620 return result; in uds_make_volume()
1627 result = vdo_allocate(config->read_threads, struct thread *, "reader threads", in uds_make_volume()
1629 if (result != VDO_SUCCESS) { in uds_make_volume()
1631 return result; in uds_make_volume()
1635 result = vdo_create_thread(read_thread_function, (void *) volume, in uds_make_volume()
1637 if (result != VDO_SUCCESS) { in uds_make_volume()
1639 return result; in uds_make_volume()