Commit 4efe85b0 authored by Matthew Sakai's avatar Matthew Sakai Committed by Mikulas Patocka
Browse files

dm vdo: fix kerneldoc warnings



Fix kerneldoc warnings across the dm-vdo target. Also
remove some unhelpful or inaccurate doc comments, and fix
some format inconsistencies that did not produce warnings.

No functional changes.

Suggested-by: default avatarSunday Adelodun <adelodunolaoluwa@yahoo.com>
Signed-off-by: default avatarMatthew Sakai <msakai@redhat.com>
Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
parent d0ac06ae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ struct action {
 * @actions: The two action slots.
 * @current_action: The current action slot.
 * @zones: The number of zones in which an action is to be applied.
 * @Scheduler: A function to schedule a default next action.
 * @scheduler: A function to schedule a default next action.
 * @get_zone_thread_id: A function to get the id of the thread on which to apply an action to a
 *                      zone.
 * @initiator_thread_id: The ID of the thread on which actions may be initiated.
+50 −25
Original line number Diff line number Diff line
@@ -149,7 +149,8 @@ const struct admin_state_code *VDO_ADMIN_STATE_RESUMING = &VDO_CODE_RESUMING;
/**
 * get_next_state() - Determine the state which should be set after a given operation completes
 *                    based on the operation and the current state.
 * @operation The operation to be started.
 * @state: The current admin state.
 * @operation: The operation to be started.
 *
 * Return: The state to set when the operation completes or NULL if the operation can not be
 *         started in the current state.
@@ -187,6 +188,8 @@ static const struct admin_state_code *get_next_state(const struct admin_state *s

/**
 * vdo_finish_operation() - Finish the current operation.
 * @state: The current admin state.
 * @result: The result of the operation.
 *
 * Will notify the operation waiter if there is one. This method should be used for operations
 * started with vdo_start_operation(). For operations which were started with vdo_start_draining(),
@@ -214,8 +217,10 @@ bool vdo_finish_operation(struct admin_state *state, int result)

/**
 * begin_operation() - Begin an operation if it may be started given the current state.
 * @waiter A completion to notify when the operation is complete; may be NULL.
 * @initiator The vdo_admin_initiator_fn to call if the operation may begin; may be NULL.
 * @state: The current admin state.
 * @operation: The operation to be started.
 * @waiter: A completion to notify when the operation is complete; may be NULL.
 * @initiator: The vdo_admin_initiator_fn to call if the operation may begin; may be NULL.
 *
 * Return: VDO_SUCCESS or an error.
 */
@@ -259,8 +264,10 @@ static int __must_check begin_operation(struct admin_state *state,

/**
 * start_operation() - Start an operation if it may be started given the current state.
 * @waiter     A completion to notify when the operation is complete.
 * @initiator The vdo_admin_initiator_fn to call if the operation may begin; may be NULL.
 * @state: The current admin state.
 * @operation: The operation to be started.
 * @waiter: A completion to notify when the operation is complete; may be NULL.
 * @initiator: The vdo_admin_initiator_fn to call if the operation may begin; may be NULL.
 *
 * Return: true if the operation was started.
 */
@@ -274,10 +281,10 @@ static inline bool __must_check start_operation(struct admin_state *state,

/**
 * check_code() - Check the result of a state validation.
 * @valid true if the code is of an appropriate type.
 * @code The code which failed to be of the correct type.
 * @what What the code failed to be, for logging.
 * @waiter The completion to notify of the error; may be NULL.
 * @valid: True if the code is of an appropriate type.
 * @code: The code which failed to be of the correct type.
 * @what: What the code failed to be, for logging.
 * @waiter: The completion to notify of the error; may be NULL.
 *
 * If the result failed, log an invalid state error and, if there is a waiter, notify it.
 *
@@ -301,7 +308,8 @@ static bool check_code(bool valid, const struct admin_state_code *code, const ch

/**
 * assert_vdo_drain_operation() - Check that an operation is a drain.
 * @waiter The completion to finish with an error if the operation is not a drain.
 * @operation: The operation to check.
 * @waiter: The completion to finish with an error if the operation is not a drain.
 *
 * Return: true if the specified operation is a drain.
 */
@@ -313,9 +321,10 @@ static bool __must_check assert_vdo_drain_operation(const struct admin_state_cod

/**
 * vdo_start_draining() - Initiate a drain operation if the current state permits it.
 * @operation The type of drain to initiate.
 * @waiter The completion to notify when the drain is complete.
 * @initiator The vdo_admin_initiator_fn to call if the operation may begin; may be NULL.
 * @state: The current admin state.
 * @operation: The type of drain to initiate.
 * @waiter: The completion to notify when the drain is complete.
 * @initiator: The vdo_admin_initiator_fn to call if the operation may begin; may be NULL.
 *
 * Return: true if the drain was initiated, if not the waiter will be notified.
 */
@@ -345,6 +354,7 @@ bool vdo_start_draining(struct admin_state *state,

/**
 * vdo_finish_draining() - Finish a drain operation if one was in progress.
 * @state: The current admin state.
 *
 * Return: true if the state was draining; will notify the waiter if so.
 */
@@ -355,6 +365,8 @@ bool vdo_finish_draining(struct admin_state *state)

/**
 * vdo_finish_draining_with_result() - Finish a drain operation with a status code.
 * @state: The current admin state.
 * @result: The result of the drain operation.
 *
 * Return: true if the state was draining; will notify the waiter if so.
 */
@@ -365,7 +377,8 @@ bool vdo_finish_draining_with_result(struct admin_state *state, int result)

/**
 * vdo_assert_load_operation() - Check that an operation is a load.
 * @waiter The completion to finish with an error if the operation is not a load.
 * @operation: The operation to check.
 * @waiter: The completion to finish with an error if the operation is not a load.
 *
 * Return: true if the specified operation is a load.
 */
@@ -377,9 +390,10 @@ bool vdo_assert_load_operation(const struct admin_state_code *operation,

/**
 * vdo_start_loading() - Initiate a load operation if the current state permits it.
 * @operation The type of load to initiate.
 * @waiter The completion to notify when the load is complete (may be NULL).
 * @initiator The vdo_admin_initiator_fn to call if the operation may begin; may be NULL.
 * @state: The current admin state.
 * @operation: The type of load to initiate.
 * @waiter: The completion to notify when the load is complete; may be NULL.
 * @initiator: The vdo_admin_initiator_fn to call if the operation may begin; may be NULL.
 *
 * Return: true if the load was initiated, if not the waiter will be notified.
 */
@@ -393,6 +407,7 @@ bool vdo_start_loading(struct admin_state *state,

/**
 * vdo_finish_loading() - Finish a load operation if one was in progress.
 * @state: The current admin state.
 *
 * Return: true if the state was loading; will notify the waiter if so.
 */
@@ -403,7 +418,8 @@ bool vdo_finish_loading(struct admin_state *state)

/**
 * vdo_finish_loading_with_result() - Finish a load operation with a status code.
 * @result The result of the load operation.
 * @state: The current admin state.
 * @result: The result of the load operation.
 *
 * Return: true if the state was loading; will notify the waiter if so.
 */
@@ -414,7 +430,8 @@ bool vdo_finish_loading_with_result(struct admin_state *state, int result)

/**
 * assert_vdo_resume_operation() - Check whether an admin_state_code is a resume operation.
 * @waiter The completion to notify if the operation is not a resume operation; may be NULL.
 * @operation: The operation to check.
 * @waiter: The completion to notify if the operation is not a resume operation; may be NULL.
 *
 * Return: true if the code is a resume operation.
 */
@@ -427,9 +444,10 @@ static bool __must_check assert_vdo_resume_operation(const struct admin_state_co

/**
 * vdo_start_resuming() - Initiate a resume operation if the current state permits it.
 * @operation The type of resume to start.
 * @waiter The completion to notify when the resume is complete (may be NULL).
 * @initiator The vdo_admin_initiator_fn to call if the operation may begin; may be NULL.
 * @state: The current admin state.
 * @operation: The type of resume to start.
 * @waiter: The completion to notify when the resume is complete; may be NULL.
 * @initiator: The vdo_admin_initiator_fn to call if the operation may begin; may be NULL.
 *
 * Return: true if the resume was initiated, if not the waiter will be notified.
 */
@@ -443,6 +461,7 @@ bool vdo_start_resuming(struct admin_state *state,

/**
 * vdo_finish_resuming() - Finish a resume operation if one was in progress.
 * @state: The current admin state.
 *
 * Return: true if the state was resuming; will notify the waiter if so.
 */
@@ -453,7 +472,8 @@ bool vdo_finish_resuming(struct admin_state *state)

/**
 * vdo_finish_resuming_with_result() - Finish a resume operation with a status code.
 * @result The result of the resume operation.
 * @state: The current admin state.
 * @result: The result of the resume operation.
 *
 * Return: true if the state was resuming; will notify the waiter if so.
 */
@@ -465,6 +485,7 @@ bool vdo_finish_resuming_with_result(struct admin_state *state, int result)
/**
 * vdo_resume_if_quiescent() - Change the state to normal operation if the current state is
 *                             quiescent.
 * @state: The current admin state.
 *
 * Return: VDO_SUCCESS if the state resumed, VDO_INVALID_ADMIN_STATE otherwise.
 */
@@ -479,6 +500,8 @@ int vdo_resume_if_quiescent(struct admin_state *state)

/**
 * vdo_start_operation() - Attempt to start an operation.
 * @state: The current admin state.
 * @operation: The operation to attempt to start.
 *
 * Return: VDO_SUCCESS if the operation was started, VDO_INVALID_ADMIN_STATE if not
 */
@@ -490,8 +513,10 @@ int vdo_start_operation(struct admin_state *state,

/**
 * vdo_start_operation_with_waiter() - Attempt to start an operation.
 * @waiter the completion to notify when the operation completes or fails to start; may be NULL.
 * @initiator The vdo_admin_initiator_fn to call if the operation may begin; may be NULL.
 * @state: The current admin state.
 * @operation: The operation to attempt to start.
 * @waiter: The completion to notify when the operation completes or fails to start; may be NULL.
 * @initiator: The vdo_admin_initiator_fn to call if the operation may begin; may be NULL.
 *
 * Return: VDO_SUCCESS if the operation was started, VDO_INVALID_ADMIN_STATE if not
 */
+43 −8
Original line number Diff line number Diff line
@@ -174,6 +174,7 @@ static inline struct vdo_page_completion *page_completion_from_waiter(struct vdo

/**
 * initialize_info() - Initialize all page info structures and put them on the free list.
 * @cache: The page cache.
 *
 * Return: VDO_SUCCESS or an error.
 */
@@ -209,6 +210,7 @@ static int initialize_info(struct vdo_page_cache *cache)
/**
 * allocate_cache_components() - Allocate components of the cache which require their own
 *                               allocation.
 * @cache: The page cache.
 *
 * The caller is responsible for all clean up on errors.
 *
@@ -238,6 +240,8 @@ static int __must_check allocate_cache_components(struct vdo_page_cache *cache)
/**
 * assert_on_cache_thread() - Assert that a function has been called on the VDO page cache's
 *                            thread.
 * @cache: The page cache.
 * @function_name: The funtion name to report if the assertion fails.
 */
static inline void assert_on_cache_thread(struct vdo_page_cache *cache,
					  const char *function_name)
@@ -271,6 +275,7 @@ static void report_cache_pressure(struct vdo_page_cache *cache)

/**
 * get_page_state_name() - Return the name of a page state.
 * @state: The page state to describe.
 *
 * If the page state is invalid a static string is returned and the invalid state is logged.
 *
@@ -342,6 +347,8 @@ static void update_lru(struct page_info *info)
/**
 * set_info_state() - Set the state of a page_info and put it on the right list, adjusting
 *                    counters.
 * @info: The page info to update.
 * @new_state: The new state to set.
 */
static void set_info_state(struct page_info *info, enum vdo_page_buffer_state new_state)
{
@@ -416,6 +423,7 @@ static int reset_page_info(struct page_info *info)

/**
 * find_free_page() - Find a free page.
 * @cache: The page cache.
 *
 * Return: A pointer to the page info structure (if found), NULL otherwise.
 */
@@ -433,6 +441,7 @@ static struct page_info * __must_check find_free_page(struct vdo_page_cache *cac

/**
 * find_page() - Find the page info (if any) associated with a given pbn.
 * @cache: The page cache.
 * @pbn: The absolute physical block number of the page.
 *
 * Return: The page info for the page if available, or NULL if not.
@@ -449,6 +458,7 @@ static struct page_info * __must_check find_page(struct vdo_page_cache *cache,

/**
 * select_lru_page() - Determine which page is least recently used.
 * @cache: The page cache.
 *
 * Picks the least recently used from among the non-busy entries at the front of each of the lru
 * list. Since whenever we mark a page busy we also put it to the end of the list it is unlikely
@@ -523,6 +533,8 @@ static void complete_waiter_with_page(struct vdo_waiter *waiter, void *page_info

/**
 * distribute_page_over_waitq() - Complete a waitq of VDO page completions with a page result.
 * @info: The loaded page info.
 * @waitq: The list of waiting data_vios.
 *
 * Upon completion the waitq will be empty.
 *
@@ -548,7 +560,9 @@ static unsigned int distribute_page_over_waitq(struct page_info *info,

/**
 * set_persistent_error() - Set a persistent error which all requests will receive in the future.
 * @cache: The page cache.
 * @context: A string describing what triggered the error.
 * @result: The error result to set on the cache.
 *
 * Once triggered, all enqueued completions will get this error. Any future requests will result in
 * this error as well.
@@ -581,6 +595,7 @@ static void set_persistent_error(struct vdo_page_cache *cache, const char *conte
/**
 * validate_completed_page() - Check that a page completion which is being freed to the cache
 *                             referred to a valid page and is in a valid state.
 * @completion: The page completion to check.
 * @writable: Whether a writable page is required.
 *
 * Return: VDO_SUCCESS if the page was valid, otherwise as error
@@ -758,6 +773,8 @@ static void load_cache_page_endio(struct bio *bio)

/**
 * launch_page_load() - Begin the process of loading a page.
 * @info: The page info to launch.
 * @pbn: The absolute physical block number of the page to load.
 *
 * Return: VDO_SUCCESS or an error code.
 */
@@ -836,6 +853,7 @@ static void save_pages(struct vdo_page_cache *cache)

/**
 * schedule_page_save() - Add a page to the outgoing list of pages waiting to be saved.
 * @info: The page info to save.
 *
 * Once in the list, a page may not be used until it has been written out.
 */
@@ -854,6 +872,7 @@ static void schedule_page_save(struct page_info *info)
/**
 * launch_page_save() - Add a page to outgoing pages waiting to be saved, and then start saving
 * pages if another save is not in progress.
 * @info: The page info to save.
 */
static void launch_page_save(struct page_info *info)
{
@@ -864,6 +883,7 @@ static void launch_page_save(struct page_info *info)
/**
 * completion_needs_page() - Determine whether a given vdo_page_completion (as a waiter) is
 *                           requesting a given page number.
 * @waiter: The page completion waiter to check.
 * @context: A pointer to the pbn of the desired page.
 *
 * Implements waiter_match_fn.
@@ -880,6 +900,7 @@ static bool completion_needs_page(struct vdo_waiter *waiter, void *context)
/**
 * allocate_free_page() - Allocate a free page to the first completion in the waiting queue, and
 *                        any other completions that match it in page number.
 * @info: The page info to allocate a page for.
 */
static void allocate_free_page(struct page_info *info)
{
@@ -925,6 +946,7 @@ static void allocate_free_page(struct page_info *info)

/**
 * discard_a_page() - Begin the process of discarding a page.
 * @cache: The page cache.
 *
 * If no page is discardable, increments a count of deferred frees so that the next release of a
 * page which is no longer busy will kick off another discard cycle. This is an indication that the
@@ -955,10 +977,6 @@ static void discard_a_page(struct vdo_page_cache *cache)
	launch_page_save(info);
}

/**
 * discard_page_for_completion() - Helper used to trigger a discard so that the completion can get
 *                                 a different page.
 */
static void discard_page_for_completion(struct vdo_page_completion *vdo_page_comp)
{
	struct vdo_page_cache *cache = vdo_page_comp->cache;
@@ -1132,6 +1150,7 @@ static void write_pages(struct vdo_completion *flush_completion)

/**
 * vdo_release_page_completion() - Release a VDO Page Completion.
 * @completion: The page completion to release.
 *
 * The page referenced by this completion (if any) will no longer be held busy by this completion.
 * If a page becomes discardable and there are completions awaiting free pages then a new round of
@@ -1172,10 +1191,6 @@ void vdo_release_page_completion(struct vdo_completion *completion)
	}
}

/**
 * load_page_for_completion() - Helper function to load a page as described by a VDO Page
 *                              Completion.
 */
static void load_page_for_completion(struct page_info *info,
				     struct vdo_page_completion *vdo_page_comp)
{
@@ -1319,6 +1334,7 @@ int vdo_get_cached_page(struct vdo_completion *completion,

/**
 * vdo_invalidate_page_cache() - Invalidate all entries in the VDO page cache.
 * @cache: The page cache.
 *
 * There must not be any dirty pages in the cache.
 *
@@ -1345,6 +1361,10 @@ int vdo_invalidate_page_cache(struct vdo_page_cache *cache)

/**
 * get_tree_page_by_index() - Get the tree page for a given height and page index.
 * @forest: The block map forest.
 * @root_index: The root index of the tree to search.
 * @height: The height in the tree.
 * @page_index: The page index.
 *
 * Return: The requested page.
 */
@@ -2211,6 +2231,7 @@ static void allocate_block_map_page(struct block_map_zone *zone,
/**
 * vdo_find_block_map_slot() - Find the block map slot in which the block map entry for a data_vio
 *                             resides and cache that result in the data_vio.
 * @data_vio: The data vio.
 *
 * All ancestors in the tree will be allocated or loaded, as needed.
 */
@@ -2435,6 +2456,7 @@ static void deforest(struct forest *forest, size_t first_page_segment)
/**
 * make_forest() - Make a collection of trees for a block_map, expanding the existing forest if
 *                 there is one.
 * @map: The block map.
 * @entries: The number of entries the block map will hold.
 *
 * Return: VDO_SUCCESS or an error.
@@ -2476,6 +2498,7 @@ static int make_forest(struct block_map *map, block_count_t entries)

/**
 * replace_forest() - Replace a block_map's forest with the already-prepared larger forest.
 * @map: The block map.
 */
static void replace_forest(struct block_map *map)
{
@@ -2492,6 +2515,7 @@ static void replace_forest(struct block_map *map)
/**
 * finish_cursor() - Finish the traversal of a single tree. If it was the last cursor, finish the
 *                   traversal.
 * @cursor: The cursor to complete.
 */
static void finish_cursor(struct cursor *cursor)
{
@@ -2549,6 +2573,7 @@ static void traversal_endio(struct bio *bio)

/**
 * traverse() - Traverse a single block map tree.
 * @cursor: A cursor tracking traversal progress.
 *
 * This is the recursive heart of the traversal process.
 */
@@ -2619,6 +2644,7 @@ static void traverse(struct cursor *cursor)
/**
 * launch_cursor() - Start traversing a single block map tree now that the cursor has a VIO with
 *                   which to load pages.
 * @waiter: The parent of the cursor to launch.
 * @context: The pooled_vio just acquired.
 *
 * Implements waiter_callback_fn.
@@ -2636,6 +2662,8 @@ static void launch_cursor(struct vdo_waiter *waiter, void *context)

/**
 * compute_boundary() - Compute the number of pages used at each level of the given root's tree.
 * @map: The block map.
 * @root_index: The tree root index.
 *
 * Return: The list of page counts as a boundary structure.
 */
@@ -2668,6 +2696,7 @@ static struct boundary compute_boundary(struct block_map *map, root_count_t root

/**
 * vdo_traverse_forest() - Walk the entire forest of a block map.
 * @map: The block map.
 * @callback: A function to call with the pbn of each allocated node in the forest.
 * @completion: The completion to notify on each traversed PBN, and when traversal completes.
 */
@@ -2707,6 +2736,9 @@ void vdo_traverse_forest(struct block_map *map, vdo_entry_callback_fn callback,

/**
 * initialize_block_map_zone() - Initialize the per-zone portions of the block map.
 * @map: The block map.
 * @zone_number: The zone to initialize.
 * @cache_size: The total block map cache size.
 * @maximum_age: The number of journal blocks before a dirtied page is considered old and must be
 *               written out.
 */
@@ -3091,6 +3123,7 @@ static void fetch_mapping_page(struct data_vio *data_vio, bool modifiable,

/**
 * clear_mapped_location() - Clear a data_vio's mapped block location, setting it to be unmapped.
 * @data_vio: The data vio.
 *
 * This indicates the block map entry for the logical block is either unmapped or corrupted.
 */
@@ -3104,6 +3137,8 @@ static void clear_mapped_location(struct data_vio *data_vio)
/**
 * set_mapped_location() - Decode and validate a block map entry, and set the mapped location of a
 *                         data_vio.
 * @data_vio: The data vio.
 * @entry: The new mapped entry to set.
 *
 * Return: VDO_SUCCESS or VDO_BAD_MAPPING if the map entry is invalid or an error code for any
 *         other failure
+5 −0
Original line number Diff line number Diff line
@@ -65,6 +65,8 @@ static inline void assert_incomplete(struct vdo_completion *completion)

/**
 * vdo_set_completion_result() - Set the result of a completion.
 * @completion: The completion to update.
 * @result: The result to set.
 *
 * Older errors will not be masked.
 */
@@ -77,6 +79,7 @@ void vdo_set_completion_result(struct vdo_completion *completion, int result)

/**
 * vdo_launch_completion_with_priority() - Run or enqueue a completion.
 * @completion: The completion to launch.
 * @priority: The priority at which to enqueue the completion.
 *
 * If called on the correct thread (i.e. the one specified in the completion's callback_thread_id
@@ -125,6 +128,8 @@ void vdo_enqueue_completion(struct vdo_completion *completion,

/**
 * vdo_requeue_completion_if_needed() - Requeue a completion if not called on the specified thread.
 * @completion: The completion to requeue.
 * @callback_thread_id: The thread on which to requeue the completion.
 *
 * Return: True if the completion was requeued; callers may not access the completion in this case.
 */
+32 −2
Original line number Diff line number Diff line
@@ -227,6 +227,7 @@ static inline u64 get_arrival_time(struct bio *bio)
/**
 * check_for_drain_complete_locked() - Check whether a data_vio_pool has no outstanding data_vios
 *				       or waiters while holding the pool's lock.
 * @pool: The data_vio pool.
 */
static bool check_for_drain_complete_locked(struct data_vio_pool *pool)
{
@@ -387,6 +388,7 @@ struct data_vio_compression_status advance_data_vio_compression_stage(struct dat

/**
 * cancel_data_vio_compression() - Prevent this data_vio from being compressed or packed.
 * @data_vio: The data_vio.
 *
 * Return: true if the data_vio is in the packer and the caller was the first caller to cancel it.
 */
@@ -483,6 +485,8 @@ static void attempt_logical_block_lock(struct vdo_completion *completion)
/**
 * launch_data_vio() - (Re)initialize a data_vio to have a new logical block number, keeping the
 *		       same parent and other state and send it on its way.
 * @data_vio: The data_vio to launch.
 * @lbn: The logical block number.
 */
static void launch_data_vio(struct data_vio *data_vio, logical_block_number_t lbn)
{
@@ -641,6 +645,7 @@ static void update_limiter(struct limiter *limiter)

/**
 * schedule_releases() - Ensure that release processing is scheduled.
 * @pool: The data_vio pool.
 *
 * If this call switches the state to processing, enqueue. Otherwise, some other thread has already
 * done so.
@@ -768,6 +773,8 @@ static void initialize_limiter(struct limiter *limiter, struct data_vio_pool *po

/**
 * initialize_data_vio() - Allocate the components of a data_vio.
 * @data_vio: The data_vio to initialize.
 * @vdo: The vdo containing the data_vio.
 *
 * The caller is responsible for cleaning up the data_vio on error.
 *
@@ -880,6 +887,7 @@ int make_data_vio_pool(struct vdo *vdo, data_vio_count_t pool_size,

/**
 * free_data_vio_pool() - Free a data_vio_pool and the data_vios in it.
 * @pool: The data_vio pool to free.
 *
 * All data_vios must be returned to the pool before calling this function.
 */
@@ -944,6 +952,8 @@ static void wait_permit(struct limiter *limiter, struct bio *bio)

/**
 * vdo_launch_bio() - Acquire a data_vio from the pool, assign the bio to it, and launch it.
 * @pool: The data_vio pool.
 * @bio: The bio to launch.
 *
 * This will block if data_vios or discard permits are not available.
 */
@@ -994,6 +1004,7 @@ static void assert_on_vdo_cpu_thread(const struct vdo *vdo, const char *name)

/**
 * drain_data_vio_pool() - Wait asynchronously for all data_vios to be returned to the pool.
 * @pool: The data_vio pool.
 * @completion: The completion to notify when the pool has drained.
 */
void drain_data_vio_pool(struct data_vio_pool *pool, struct vdo_completion *completion)
@@ -1005,6 +1016,7 @@ void drain_data_vio_pool(struct data_vio_pool *pool, struct vdo_completion *comp

/**
 * resume_data_vio_pool() - Resume a data_vio pool.
 * @pool: The data_vio pool.
 * @completion: The completion to notify when the pool has resumed.
 */
void resume_data_vio_pool(struct data_vio_pool *pool, struct vdo_completion *completion)
@@ -1024,6 +1036,7 @@ static void dump_limiter(const char *name, struct limiter *limiter)

/**
 * dump_data_vio_pool() - Dump a data_vio pool to the log.
 * @pool: The data_vio pool.
 * @dump_vios: Whether to dump the details of each busy data_vio as well.
 */
void dump_data_vio_pool(struct data_vio_pool *pool, bool dump_vios)
@@ -1114,6 +1127,7 @@ static void perform_cleanup_stage(struct data_vio *data_vio,
/**
 * release_allocated_lock() - Release the PBN lock and/or the reference on the allocated block at
 *			      the end of processing a data_vio.
 * @completion: The data_vio holding the lock.
 */
static void release_allocated_lock(struct vdo_completion *completion)
{
@@ -1194,6 +1208,7 @@ static void transfer_lock(struct data_vio *data_vio, struct lbn_lock *lock)
/**
 * release_logical_lock() - Release the logical block lock and flush generation lock at the end of
 *			    processing a data_vio.
 * @completion: The data_vio holding the lock.
 */
static void release_logical_lock(struct vdo_completion *completion)
{
@@ -1228,6 +1243,7 @@ static void clean_hash_lock(struct vdo_completion *completion)

/**
 * finish_cleanup() - Make some assertions about a data_vio which has finished cleaning up.
 * @data_vio: The data_vio.
 *
 * If it is part of a multi-block discard, starts on the next block, otherwise, returns it to the
 * pool.
@@ -1342,6 +1358,7 @@ void handle_data_vio_error(struct vdo_completion *completion)
/**
 * get_data_vio_operation_name() - Get the name of the last asynchronous operation performed on a
 *				   data_vio.
 * @data_vio: The data_vio.
 */
const char *get_data_vio_operation_name(struct data_vio *data_vio)
{
@@ -1355,7 +1372,7 @@ const char *get_data_vio_operation_name(struct data_vio *data_vio)

/**
 * data_vio_allocate_data_block() - Allocate a data block.
 *
 * @data_vio: The data_vio.
 * @write_lock_type: The type of write lock to obtain on the block.
 * @callback: The callback which will attempt an allocation in the current zone and continue if it
 *	      succeeds.
@@ -1379,6 +1396,7 @@ void data_vio_allocate_data_block(struct data_vio *data_vio,

/**
 * release_data_vio_allocation_lock() - Release the PBN lock on a data_vio's allocated block.
 * @data_vio: The data_vio.
 * @reset: If true, the allocation will be reset (i.e. any allocated pbn will be forgotten).
 *
 * If the reference to the locked block is still provisional, it will be released as well.
@@ -1399,6 +1417,7 @@ void release_data_vio_allocation_lock(struct data_vio *data_vio, bool reset)

/**
 * uncompress_data_vio() - Uncompress the data a data_vio has just read.
 * @data_vio: The data_vio.
 * @mapping_state: The mapping state indicating which fragment to decompress.
 * @buffer: The buffer to receive the uncompressed data.
 */
@@ -1519,6 +1538,7 @@ static void complete_zero_read(struct vdo_completion *completion)

/**
 * read_block() - Read a block asynchronously.
 * @completion: The data_vio doing the read.
 *
 * This is the callback registered in read_block_mapping().
 */
@@ -1675,6 +1695,7 @@ static void journal_remapping(struct vdo_completion *completion)

/**
 * read_old_block_mapping() - Get the previous PBN/LBN mapping of an in-progress write.
 * @completion: The data_vio doing the read.
 *
 * Gets the previous PBN mapped to this LBN from the block map, so as to make an appropriate
 * journal entry referencing the removal of this LBN->PBN mapping.
@@ -1704,6 +1725,7 @@ void update_metadata_for_data_vio_write(struct data_vio *data_vio, struct pbn_lo

/**
 * pack_compressed_data() - Attempt to pack the compressed data_vio into a block.
 * @completion: The data_vio.
 *
 * This is the callback registered in launch_compress_data_vio().
 */
@@ -1725,6 +1747,7 @@ static void pack_compressed_data(struct vdo_completion *completion)

/**
 * compress_data_vio() - Do the actual work of compressing the data on a CPU queue.
 * @completion: The data_vio.
 *
 * This callback is registered in launch_compress_data_vio().
 */
@@ -1754,6 +1777,7 @@ static void compress_data_vio(struct vdo_completion *completion)

/**
 * launch_compress_data_vio() - Continue a write by attempting to compress the data.
 * @data_vio: The data_vio.
 *
 * This is a re-entry point to vio_write used by hash locks.
 */
@@ -1796,7 +1820,8 @@ void launch_compress_data_vio(struct data_vio *data_vio)
/**
 * hash_data_vio() - Hash the data in a data_vio and set the hash zone (which also flags the record
 *		     name as set).

 * @completion: The data_vio.
 *
 * This callback is registered in prepare_for_dedupe().
 */
static void hash_data_vio(struct vdo_completion *completion)
@@ -1832,6 +1857,7 @@ static void prepare_for_dedupe(struct data_vio *data_vio)
/**
 * write_bio_finished() - This is the bio_end_io function registered in write_block() to be called
 *			  when a data_vio's write to the underlying storage has completed.
 * @bio: The bio to update.
 */
static void write_bio_finished(struct bio *bio)
{
@@ -1884,6 +1910,7 @@ void write_data_vio(struct data_vio *data_vio)

/**
 * acknowledge_write_callback() - Acknowledge a write to the requestor.
 * @completion: The data_vio.
 *
 * This callback is registered in allocate_block() and continue_write_with_block_map_slot().
 */
@@ -1909,6 +1936,7 @@ static void acknowledge_write_callback(struct vdo_completion *completion)

/**
 * allocate_block() - Attempt to allocate a block in the current allocation zone.
 * @completion: The data_vio.
 *
 * This callback is registered in continue_write_with_block_map_slot().
 */
@@ -1941,6 +1969,7 @@ static void allocate_block(struct vdo_completion *completion)

/**
 * handle_allocation_error() - Handle an error attempting to allocate a block.
 * @completion: The data_vio.
 *
 * This error handler is registered in continue_write_with_block_map_slot().
 */
@@ -1970,6 +1999,7 @@ static int assert_is_discard(struct data_vio *data_vio)

/**
 * continue_data_vio_with_block_map_slot() - Read the data_vio's mapping from the block map.
 * @completion: The data_vio to continue.
 *
 * This callback is registered in launch_read_data_vio().
 */
Loading