Lines Matching refs:completion

16 #include "completion.h"
24 struct vdo_completion completion;
68 * @completion: The completion to convert.
70 * Return: The completion as a flusher.
72 static struct flusher *as_flusher(struct vdo_completion *completion)
74 vdo_assert_completion_type(completion, VDO_FLUSH_NOTIFICATION_COMPLETION);
75 return container_of(completion, struct flusher, completion);
80 * @completion: The completion to convert.
82 * Return: The completion as a vdo_flush.
84 static inline struct vdo_flush *completion_as_vdo_flush(struct vdo_completion *completion)
86 vdo_assert_completion_type(completion, VDO_FLUSH_COMPLETION);
87 return container_of(completion, struct vdo_flush, completion);
117 vdo_initialize_completion(&flush->completion, flusher->vdo,
145 vdo_initialize_completion(&vdo->flusher->completion, vdo,
186 * @completion: The flusher completion.
192 static void finish_notification(struct vdo_completion *completion)
194 struct flusher *flusher = as_flusher(completion);
207 * @completion: The flusher completion.
212 static void flush_packer_callback(struct vdo_completion *completion)
214 struct flusher *flusher = as_flusher(completion);
217 vdo_launch_completion_callback(completion, finish_notification,
223 * @completion: The flusher as a completion.
228 static void increment_generation(struct vdo_completion *completion)
230 struct flusher *flusher = as_flusher(completion);
235 vdo_launch_completion_callback(completion, flush_packer_callback,
241 vdo_launch_completion_callback(completion, increment_generation,
256 flusher->completion.requeue = true;
257 vdo_launch_completion_callback(&flusher->completion, increment_generation,
263 * @completion: A flush request (as a vdo_completion)
267 static void flush_vdo(struct vdo_completion *completion)
269 struct vdo_flush *flush = completion_as_vdo_flush(completion);
270 struct flusher *flusher = completion->vdo->flusher;
378 struct vdo_completion *completion = &flush->completion;
380 vdo_prepare_completion(completion, flush_vdo, flush_vdo,
381 completion->vdo->thread_config.packer_thread, NULL);
382 vdo_enqueue_completion(completion, VDO_DEFAULT_Q_FLUSH_PRIORITY);
435 struct flusher *flusher = flush->completion.vdo->flusher;
459 * @completion: The flush request.
461 static void vdo_complete_flush_callback(struct vdo_completion *completion)
463 struct vdo_flush *flush = completion_as_vdo_flush(completion);
464 struct vdo *vdo = completion->vdo;
518 struct vdo_completion *completion = &flush->completion;
520 vdo_prepare_completion(completion, vdo_complete_flush_callback,
522 select_bio_queue(completion->vdo->flusher), NULL);
523 vdo_enqueue_completion(completion, BIO_Q_FLUSH_PRIORITY);
539 * @completion: The completion to finish when the flusher has drained.
544 void vdo_drain_flusher(struct flusher *flusher, struct vdo_completion *completion)
547 vdo_start_draining(&flusher->state, VDO_ADMIN_STATE_SUSPENDING, completion,
554 * @parent: The completion to finish when the flusher has resumed.