Lines Matching refs:completion

12 #include "completion.h"
41 * @completion: The completion for performing actions.
54 struct vdo_completion completion;
66 static inline struct action_manager *as_action_manager(struct vdo_completion *completion)
68 vdo_assert_completion_type(completion, VDO_ACTION_COMPLETION);
69 return container_of(completion, struct action_manager, completion);
79 static void no_preamble(void *context __always_unused, struct vdo_completion *completion)
81 vdo_finish_completion(completion);
128 vdo_initialize_completion(&manager->completion, vdo, VDO_ACTION_COMPLETION);
143 static void finish_action_callback(struct vdo_completion *completion);
144 static void apply_to_zone(struct vdo_completion *completion);
151 static void preserve_error(struct vdo_completion *completion)
153 if (completion->parent != NULL)
154 vdo_set_completion_result(completion->parent, completion->result);
156 vdo_reset_completion(completion);
157 vdo_run_completion(completion);
162 vdo_prepare_completion_for_requeue(&manager->completion, apply_to_zone,
170 vdo_prepare_completion_for_requeue(&manager->completion, finish_action_callback,
175 static void apply_to_zone(struct vdo_completion *completion)
178 struct action_manager *manager = as_action_manager(completion);
195 manager->current_action->zone_action(manager->context, zone, completion);
198 static void handle_preamble_error(struct vdo_completion *completion)
201 completion->callback = finish_action_callback;
202 preserve_error(completion);
216 finish_action_callback(&manager->completion);
224 vdo_prepare_completion_for_requeue(&manager->completion, apply_to_zone,
230 action->preamble(manager->context, &manager->completion);
250 static void finish_action_callback(struct vdo_completion *completion)
254 struct action_manager *manager = as_action_manager(completion);