Lines Matching refs:result

186 		int result;
192 result = create_metadata_vio(cache->vdo, VIO_TYPE_BLOCK_MAP,
195 if (result != VDO_SUCCESS)
196 return result;
222 int result;
224 result = vdo_allocate(cache->page_count, struct page_info, "page infos",
226 if (result != VDO_SUCCESS)
227 return result;
229 result = vdo_allocate_memory(size, VDO_BLOCK_SIZE, "cache pages", &cache->pages);
230 if (result != VDO_SUCCESS)
231 return result;
233 result = vdo_int_map_create(cache->page_count, &cache->page_map);
234 if (result != VDO_SUCCESS)
235 return result;
283 int result;
290 result = VDO_ASSERT(state < ARRAY_SIZE(state_names),
292 if (result != VDO_SUCCESS)
381 int result = VDO_ASSERT((pbn == NO_PAGE) || (info->pbn == NO_PAGE),
383 if (result != VDO_SUCCESS)
384 return result;
392 result = vdo_int_map_put(cache->page_map, pbn, info, true, NULL);
393 if (result != VDO_SUCCESS)
394 return result;
402 int result;
404 result = VDO_ASSERT(info->busy == 0, "VDO Page must not be busy");
405 if (result != VDO_SUCCESS)
406 return result;
408 result = VDO_ASSERT(!vdo_waitq_has_waiters(&info->waiting),
410 if (result != VDO_SUCCESS)
411 return result;
413 result = set_info_pbn(info, NO_PAGE);
416 return result;
477 * @info: The page info representing the result page.
509 int *result = result_ptr;
511 vdo_fail_completion(&page_completion_from_waiter(waiter)->completion, *result);
527 * distribute_page_over_waitq() - Complete a waitq of VDO page completions with a page result.
555 * Once triggered, all enqueued completions will get this error. Any future requests will result in
559 int result)
565 if ((result != VDO_READ_ONLY) && !vdo_is_read_only(vdo)) {
566 vdo_log_error_strerror(result, "VDO Page Cache persistent error: %s",
568 vdo_enter_read_only_mode(vdo, result);
574 complete_waiter_with_error, &result);
579 complete_waiter_with_error, &result);
593 int result;
595 result = VDO_ASSERT(completion->ready, "VDO Page completion not ready");
596 if (result != VDO_SUCCESS)
597 return result;
599 result = VDO_ASSERT(completion->info != NULL,
601 if (result != VDO_SUCCESS)
602 return result;
604 result = VDO_ASSERT(completion->info->pbn == completion->pbn,
606 if (result != VDO_SUCCESS)
607 return result;
609 result = VDO_ASSERT(is_valid(completion->info),
611 if (result != VDO_SUCCESS)
612 return result;
615 result = VDO_ASSERT(completion->writable,
617 if (result != VDO_SUCCESS)
618 return result;
638 static void enter_zone_read_only_mode(struct block_map_zone *zone, int result)
640 vdo_enter_read_only_mode(zone->block_map->vdo, result);
654 int result = validate_completed_page(completion, writable);
656 if (result == VDO_SUCCESS)
659 enter_zone_read_only_mode(completion->info->cache->zone, result);
669 int result = completion->result;
675 vdo_enter_read_only_mode(cache->zone->block_map->vdo, result);
678 vdo_waitq_notify_all_waiters(&info->waiting, complete_waiter_with_error, &result);
707 int result = vdo_log_error_strerror(VDO_BAD_PAGE,
712 vdo_continue_completion(completion, result);
769 int result;
775 result = set_info_pbn(info, pbn);
776 if (result != VDO_SUCCESS)
777 return result;
779 result = VDO_ASSERT((info->busy == 0), "Page is not busy before loading.");
780 if (result != VDO_SUCCESS)
781 return result;
800 set_persistent_error(info->cache, "flush failed", completion->result);
888 int result;
904 result = reset_page_info(info);
905 if (result != VDO_SUCCESS) {
906 set_persistent_error(cache, "cannot reset page info", result);
921 result = launch_page_load(info, pbn);
922 if (result != VDO_SUCCESS) {
924 complete_waiter_with_error, &result);
1007 int result = completion->result;
1014 if (result != VDO_READ_ONLY) {
1022 set_persistent_error(cache, "cannot write page", result);
1148 if (completion->result == VDO_SUCCESS) {
1184 int result;
1187 result = launch_page_load(info, vdo_page_comp->pbn);
1188 if (result != VDO_SUCCESS) {
1190 complete_waiter_with_error, &result);
1311 int result;
1315 result = validate_completed_page(vpc, true);
1316 if (result == VDO_SUCCESS)
1319 return result;
1337 int result = VDO_ASSERT(!is_dirty(info), "cache must have no dirty pages");
1339 if (result != VDO_SUCCESS)
1340 return result;
1441 int result;
1443 result = VDO_ASSERT((in_cyclic_range(zone->oldest_generation, a, zone->generation, 1 << 8) &&
1447 if (result != VDO_SUCCESS) {
1448 enter_zone_read_only_mode(zone, result);
1457 int result;
1459 result = VDO_ASSERT((zone->dirty_page_counts[generation] > 0),
1461 if (result != VDO_SUCCESS) {
1462 enter_zone_read_only_mode(zone, result);
1476 int result;
1485 result = VDO_ASSERT((new_count != 0), "dirty page count overflow for generation %u",
1487 if (result != VDO_SUCCESS) {
1488 enter_zone_read_only_mode(zone, result);
1602 int result = completion->result;
1608 enter_zone_read_only_mode(zone, result);
1713 static void finish_lookup(struct data_vio *data_vio, int result)
1721 continue_data_vio_with_error(data_vio, result);
1727 int result = *((int *) context);
1730 if (result == VDO_NO_SPACE)
1731 result = VDO_SUCCESS;
1732 } else if (result != VDO_NO_SPACE) {
1733 result = VDO_READ_ONLY;
1736 finish_lookup(data_vio, result);
1739 static void abort_lookup(struct data_vio *data_vio, int result, char *what)
1741 if (result != VDO_NO_SPACE)
1742 enter_zone_read_only_mode(data_vio->logical.zone->block_map_zone, result);
1748 &result);
1751 finish_lookup(data_vio, result);
1754 static void abort_load(struct data_vio *data_vio, int result)
1756 abort_lookup(data_vio, result, "load");
1852 int result = completion->result;
1860 abort_load(data_vio, result);
1890 int result;
1905 result = vdo_int_map_put(zone->loading_pages, lock->key,
1907 if (result != VDO_SUCCESS)
1908 return result;
1924 int result;
1926 result = attempt_page_lock(zone, data_vio);
1927 if (result != VDO_SUCCESS) {
1928 abort_load(data_vio, result);
1946 abort_lookup(data_vio, completion->result, "allocation");
2007 int result;
2011 result = VDO_ASSERT(!vdo_waiter_is_waiting(&page->waiter),
2013 if (result != VDO_SUCCESS) {
2014 enter_zone_read_only_mode(zone, result);
2193 int result;
2201 result = attempt_page_lock(zone, data_vio);
2202 if (result != VDO_SUCCESS) {
2203 abort_lookup(data_vio, result, "allocation");
2216 * resides and cache that result in the data_vio.
2345 int result;
2349 result = vdo_allocate(forest->segments, struct boundary,
2351 if (result != VDO_SUCCESS)
2352 return result;
2354 result = vdo_allocate(forest->segments, struct tree_page *,
2356 if (result != VDO_SUCCESS)
2357 return result;
2359 result = vdo_allocate(new_pages, struct tree_page,
2361 if (result != VDO_SUCCESS)
2362 return result;
2385 int result = vdo_allocate(forest->segments,
2388 if (result != VDO_SUCCESS)
2389 return result;
2450 int result;
2462 result = vdo_allocate_extended(struct forest, map->root_count,
2465 if (result != VDO_SUCCESS)
2466 return result;
2469 result = make_segment(old_forest, new_pages, &new_boundary, forest);
2470 if (result != VDO_SUCCESS) {
2472 return result;
2595 int result = cursor->parent->entry_callback(location.pbn,
2597 if (result != VDO_SUCCESS) {
2682 int result;
2684 result = vdo_allocate_extended(struct cursors, map->root_count,
2686 if (result != VDO_SUCCESS) {
2687 vdo_fail_completion(completion, result);
2721 int result;
2732 result = vdo_allocate_extended(struct dirty_lists, maximum_age,
2735 if (result != VDO_SUCCESS)
2736 return result;
2747 result = vdo_int_map_create(VDO_LOCK_MAP_CAPACITY, &zone->loading_pages);
2748 if (result != VDO_SUCCESS)
2749 return result;
2751 result = make_vio_pool(vdo, BLOCK_MAP_VIO_POOL_SIZE,
2754 if (result != VDO_SUCCESS)
2755 return result;
2764 result = allocate_cache_components(&zone->page_cache);
2765 if (result != VDO_SUCCESS)
2766 return result;
2864 int result;
2870 result = VDO_ASSERT(cache_size > 0, "block map cache size is specified");
2871 if (result != VDO_SUCCESS)
2872 return result;
2874 result = vdo_allocate_extended(struct block_map,
2877 if (result != VDO_SUCCESS)
2878 return result;
2887 result = make_forest(map, map->entry_count);
2888 if (result != VDO_SUCCESS) {
2890 return result;
2897 result = initialize_block_map_zone(map, zone, cache_size, maximum_age);
2898 if (result != VDO_SUCCESS) {
2900 return result;
2904 result = vdo_make_action_manager(map->zone_count, get_block_map_zone_thread_id,
2908 if (result != VDO_SUCCESS) {
2910 return result;
3065 static inline void finish_processing_page(struct vdo_completion *completion, int result)
3070 vdo_continue_completion(parent, result);
3075 finish_processing_page(completion, completion->result);
3121 int result;
3123 result = vdo_get_physical_zone(vdo_from_data_vio(data_vio),
3125 if (result == VDO_SUCCESS) {
3135 if ((result != VDO_OUT_OF_RANGE) && (result != VDO_BAD_MAPPING))
3136 return result;
3165 int result;
3172 if (completion->result != VDO_SUCCESS) {
3173 finish_processing_page(completion, completion->result);
3177 result = validate_completed_page(vpc, false);
3178 if (result != VDO_SUCCESS) {
3179 finish_processing_page(completion, result);
3187 result = set_mapped_location(data_vio, entry);
3188 finish_processing_page(completion, result);
3238 int result;
3240 if (completion->result != VDO_SUCCESS) {
3241 finish_processing_page(completion, completion->result);
3246 result = validate_completed_page(vpc, true);
3247 if (result != VDO_SUCCESS) {
3248 finish_processing_page(completion, result);