Lines Matching full:completion

16 #include "completion.h"
24 struct vdo_completion completion; member
68 * @completion: The completion to convert.
70 * Return: The completion as a flusher.
72 static struct flusher *as_flusher(struct vdo_completion *completion) in as_flusher() argument
74 vdo_assert_completion_type(completion, VDO_FLUSH_NOTIFICATION_COMPLETION); in as_flusher()
75 return container_of(completion, struct flusher, completion); in as_flusher()
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) in completion_as_vdo_flush() argument
86 vdo_assert_completion_type(completion, VDO_FLUSH_COMPLETION); in completion_as_vdo_flush()
87 return container_of(completion, struct vdo_flush, completion); in completion_as_vdo_flush()
117 vdo_initialize_completion(&flush->completion, flusher->vdo, in allocate_flush()
145 vdo_initialize_completion(&vdo->flusher->completion, vdo, in vdo_make_flusher()
186 * @completion: The flusher completion.
192 static void finish_notification(struct vdo_completion *completion) in finish_notification() argument
194 struct flusher *flusher = as_flusher(completion); in finish_notification()
207 * @completion: The flusher completion.
212 static void flush_packer_callback(struct vdo_completion *completion) in flush_packer_callback() argument
214 struct flusher *flusher = as_flusher(completion); in flush_packer_callback()
217 vdo_launch_completion_callback(completion, finish_notification, in flush_packer_callback()
223 * @completion: The flusher as a completion.
228 static void increment_generation(struct vdo_completion *completion) in increment_generation() argument
230 struct flusher *flusher = as_flusher(completion); in increment_generation()
235 vdo_launch_completion_callback(completion, flush_packer_callback, in increment_generation()
241 vdo_launch_completion_callback(completion, increment_generation, in increment_generation()
256 flusher->completion.requeue = true; in notify_flush()
257 vdo_launch_completion_callback(&flusher->completion, increment_generation, in notify_flush()
263 * @completion: A flush request (as a vdo_completion)
267 static void flush_vdo(struct vdo_completion *completion) in flush_vdo() argument
269 struct vdo_flush *flush = completion_as_vdo_flush(completion); in flush_vdo()
270 struct flusher *flusher = completion->vdo->flusher; in flush_vdo()
377 struct vdo_completion *completion = &flush->completion; in launch_flush() local
379 vdo_prepare_completion(completion, flush_vdo, flush_vdo, in launch_flush()
380 completion->vdo->thread_config.packer_thread, NULL); in launch_flush()
381 vdo_enqueue_completion(completion, VDO_DEFAULT_Q_FLUSH_PRIORITY); in launch_flush()
434 struct flusher *flusher = flush->completion.vdo->flusher; in release_flush()
458 * @completion: The flush request.
460 static void vdo_complete_flush_callback(struct vdo_completion *completion) in vdo_complete_flush_callback() argument
462 struct vdo_flush *flush = completion_as_vdo_flush(completion); in vdo_complete_flush_callback()
463 struct vdo *vdo = completion->vdo; in vdo_complete_flush_callback()
517 struct vdo_completion *completion = &flush->completion; in vdo_complete_flush() local
519 vdo_prepare_completion(completion, vdo_complete_flush_callback, in vdo_complete_flush()
521 select_bio_queue(completion->vdo->flusher), NULL); in vdo_complete_flush()
522 vdo_enqueue_completion(completion, BIO_Q_FLUSH_PRIORITY); in vdo_complete_flush()
538 * @completion: The completion to finish when the flusher has drained.
543 void vdo_drain_flusher(struct flusher *flusher, struct vdo_completion *completion) in vdo_drain_flusher() argument
546 vdo_start_draining(&flusher->state, VDO_ADMIN_STATE_SUSPENDING, completion, in vdo_drain_flusher()
553 * @parent: The completion to finish when the flusher has resumed.