/linux/drivers/md/dm-vdo/ |
H A D | completion.h | 21 if ((completion->result != VDO_SUCCESS) && (completion->error_handler != NULL)) { in vdo_run_completion() 22 completion->error_handler(completion); in vdo_run_completion() 26 completion->callback(completion); in vdo_run_completion() 40 completion->result = VDO_SUCCESS; in vdo_reset_completion() 41 completion->complete = false; in vdo_reset_completion() 65 vdo_launch_completion(completion); in vdo_continue_completion() 77 vdo_finish_completion(completion); in vdo_fail_completion() 90 completion->type); in vdo_assert_completion_type() 97 completion->callback = callback; in vdo_set_completion_callback() 125 completion->parent = parent; in vdo_prepare_completion() [all …]
|
H A D | completion.c | 55 memset(completion, 0, sizeof(*completion)); in vdo_initialize_completion() 56 completion->vdo = vdo; in vdo_initialize_completion() 57 completion->type = type; in vdo_initialize_completion() 58 vdo_reset_completion(completion); in vdo_initialize_completion() 73 assert_incomplete(completion); in vdo_set_completion_result() 75 completion->result = result; in vdo_set_completion_result() 96 vdo_run_completion(completion); in vdo_launch_completion_with_priority() 102 assert_incomplete(completion); in vdo_finish_completion() 103 completion->complete = true; in vdo_finish_completion() 120 completion->requeue = false; in vdo_enqueue_completion() [all …]
|
H A D | repair.c | 199 return container_of(completion, struct repair_completion, completion); in as_repair_completion() 205 struct vdo_completion *completion = &repair->completion; in prepare_repair_completion() local 357 completion); in flush_block_map_updates() 372 vdo_set_completion_result(&repair->completion, completion->result); in handle_page_load_error() 837 completion)) in add_slab_journal_entries() 854 struct vdo_completion *completion = &allocator->completion; in vdo_replay_into_slab_journals() local 1049 completion++; in get_next_page_completion() 1052 return completion; in get_next_page_completion() 1092 completion = &page_completion->completion; in recover_ready_pages() 1670 vdo_set_completion_result(&repair->completion, completion->result); in handle_journal_load_error() [all …]
|
H A D | flush.c | 24 struct vdo_completion completion; member 75 return container_of(completion, struct flusher, completion); in as_flusher() 87 return container_of(completion, struct vdo_flush, completion); in completion_as_vdo_flush() 194 struct flusher *flusher = as_flusher(completion); in finish_notification() 214 struct flusher *flusher = as_flusher(completion); in flush_packer_callback() 230 struct flusher *flusher = as_flusher(completion); in increment_generation() 256 flusher->completion.requeue = true; in notify_flush() 270 struct flusher *flusher = completion->vdo->flusher; in flush_vdo() 377 struct vdo_completion *completion = &flush->completion; in launch_flush() local 463 struct vdo *vdo = completion->vdo; in vdo_complete_flush_callback() [all …]
|
H A D | action-manager.c | 54 struct vdo_completion completion; member 69 return container_of(completion, struct action_manager, completion); in as_action_manager() 81 vdo_finish_completion(completion); in no_preamble() 153 if (completion->parent != NULL) in preserve_error() 154 vdo_set_completion_result(completion->parent, completion->result); in preserve_error() 156 vdo_reset_completion(completion); in preserve_error() 157 vdo_run_completion(completion); in preserve_error() 201 completion->callback = finish_action_callback; in handle_preamble_error() 202 preserve_error(completion); in handle_preamble_error() 216 finish_action_callback(&manager->completion); in launch_current_action() [all …]
|
H A D | data-vio.c | 160 struct vdo_completion completion; member 218 return container_of(completion, struct data_vio_pool, completion); in as_data_vio_pool() 463 complete_data_vio(completion); in attempt_logical_block_lock() 487 struct vdo_completion *completion = &data_vio->vio.completion; in launch_data_vio() local 1275 struct vdo_completion *completion = &data_vio->vio.completion; in finish_cleanup() local 1295 completion->requeue = true; in finish_cleanup() 1364 vdo_enter_read_only_mode(completion->vdo, completion->result); in enter_read_only_mode() 1375 complete_data_vio(completion); in handle_data_vio_error() 1519 complete_data_vio(completion); in complete_read() 1553 complete_read(completion); in complete_zero_read() [all …]
|
H A D | funnel-workqueue.c | 64 struct completion *started; 115 completion, completion->callback, queue, completion->my_queue); in enqueue_work_queue_completion() 121 completion->priority = 0; in enqueue_work_queue_completion() 194 if (completion != NULL) in wait_for_next_completion() 212 if (completion != NULL) in wait_for_next_completion() 219 return completion; in wait_for_next_completion() 227 completion, queue, completion->my_queue) == VDO_SUCCESS) in process_completion() 228 completion->my_queue = NULL; in process_completion() 240 if (completion == NULL) in service_work_queue() 243 if (completion == NULL) { in service_work_queue() [all …]
|
H A D | data-vio.h | 289 return vio_as_data_vio(as_vio(completion)); in as_data_vio() 315 return data_vio->vio.completion.vdo; in vdo_from_data_vio() 353 vdo_launch_completion(&data_vio->vio.completion); in continue_data_vio() 397 vdo_launch_completion(&data_vio->vio.completion); in launch_data_vio_hash_zone_callback() 425 vdo_launch_completion(&data_vio->vio.completion); in launch_data_vio_logical_callback() 455 vdo_launch_completion(&data_vio->vio.completion); in launch_data_vio_allocated_zone_callback() 485 vdo_launch_completion(&data_vio->vio.completion); in launch_data_vio_duplicate_zone_callback() 550 vdo_launch_completion(&data_vio->vio.completion); in launch_data_vio_journal_callback() 641 struct vdo_completion *completion = &data_vio->vio.completion; in launch_data_vio_on_bio_ack_queue() local 642 struct vdo *vdo = completion->vdo; in launch_data_vio_on_bio_ack_queue() [all …]
|
H A D | dm-vdo-target.c | 1172 struct vdo_completion *completion = &vdo->admin.completion; in prepare_admin_completion() local 1178 completion->callback = callback; in prepare_admin_completion() 1181 completion->requeue = true; in prepare_admin_completion() 1182 return completion; in prepare_admin_completion() 2053 completion); in suspend_callback() 2063 completion); in suspend_callback() 2209 vdo_repair(completion); in load_callback() 2216 completion, NULL); in load_callback() 2228 completion); in load_callback() 2256 completion); in load_callback() [all …]
|
H A D | block-map.c | 171 vdo_assert_completion_type(&completion->completion, VDO_PAGE_COMPLETION); in page_completion_from_waiter() 172 return completion; in page_completion_from_waiter() 604 result = VDO_ASSERT(completion->info->pbn == completion->pbn, in validate_completed_page() 1113 struct vdo_completion *completion = &info->vio->completion; in write_pages() local 1216 struct vdo_completion *completion = &page_completion->completion; in vdo_get_page() local 1651 struct vdo_completion *completion = &vio->vio.completion; in write_page() local 2502 struct vdo_completion *completion = cursors->completion; in finish_cursor() local 2694 cursors->completion = completion; in vdo_traverse_forest() 3075 finish_processing_page(completion, completion->result); in handle_page_error() 3173 finish_processing_page(completion, completion->result); in get_mapping_from_fetched_page() [all …]
|
H A D | vdo.c | 66 struct completion completion; member 916 vdo_continue_completion(vdo_forget(completion->parent), completion->result); in continue_super_block_parent() 941 completion->callback(completion); in handle_save_error() 1117 return container_of(completion, struct read_only_notifier, completion); in as_notifier() 1136 completion->result); in finish_entering_read_only_mode() 1145 struct vdo *vdo = completion->vdo; in make_thread_read_only() 1192 vdo_launch_completion(completion); in make_thread_read_only() 1344 vdo_completion)->completion)); in complete_synchronous_action() 1360 init_completion(&sync.completion); in perform_synchronous_action() 1373 struct vdo *vdo = completion->vdo; in set_compression_callback() [all …]
|
H A D | io-submitter.c | 76 struct atomic_statistics *stats = &vio->completion.vdo->stats; in count_all_bios() 109 struct vdo *vdo = vio->completion.vdo; in send_bio_to_device() 122 void vdo_submit_vio(struct vdo_completion *completion) in vdo_submit_vio() argument 124 struct vio *vio = as_vio(completion); in vdo_submit_vio() 167 struct vio *vio = as_vio(completion); in submit_data_vio() 206 if (vio->completion.priority != vio_merge->completion.priority) in get_mergeable_locked() 273 struct vdo *vdo = vio->completion.vdo; in try_bio_map_merge() 344 struct vdo_completion *completion = &vio->completion; in __submit_metadata_vio() local 351 vdo_reset_completion(completion); in __submit_metadata_vio() 352 completion->error_handler = error_handler; in __submit_metadata_vio() [all …]
|
H A D | slab-depot.c | 297 vdo_enter_read_only_mode(completion->vdo, completion->result); in handle_write_error() 430 vdo_enter_read_only_mode(completion->vdo, completion->result); in handle_flush_error() 431 complete_reaping(completion); in handle_flush_error() 1190 struct vdo_completion *completion = &pooled->vio.completion; in write_reference_block() local 1198 completion->parent = block; in write_reference_block() 2764 completion->result); in handle_scrubber_error() 2921 slab_scrubbed(completion); in start_scrubbing() 2936 struct vdo_completion *completion = &scrubber->vio.completion; in scrub_next_slab() local 3324 actor->callback(completion); in slab_action_callback() 3338 completion->callback(completion); in handle_operation_error() [all …]
|
H A D | logical-zone.c | 32 static struct logical_zone *as_logical_zone(struct vdo_completion *completion) in as_logical_zone() argument 34 vdo_assert_completion_type(completion, VDO_GENERATION_FLUSHED_COMPLETION); in as_logical_zone() 35 return container_of(completion, struct logical_zone, completion); in as_logical_zone() 65 vdo_initialize_completion(&zone->completion, vdo, in initialize_zone() 285 static void notify_flusher(struct vdo_completion *completion) in notify_flusher() argument 287 struct logical_zone *zone = as_logical_zone(completion); in notify_flusher() 290 vdo_launch_completion_callback(completion, in notify_flusher() 300 static void attempt_generation_complete_notification(struct vdo_completion *completion) in attempt_generation_complete_notification() argument 302 struct logical_zone *zone = as_logical_zone(completion); in attempt_generation_complete_notification() 313 vdo_launch_completion_callback(&zone->completion, notify_flusher, in attempt_generation_complete_notification() [all …]
|
H A D | vio.h | 41 static inline struct vio *as_vio(struct vdo_completion *completion) in as_vio() argument 43 vdo_assert_completion_type(completion, VIO_COMPLETION); in as_vio() 44 return container_of(completion, struct vio, completion); in as_vio() 56 return vio->completion.vdo->thread_config.bio_threads[vio->bio_zone]; in get_vio_bio_zone_thread_id() 118 vdo_initialize_completion(&vio->completion, vdo, VIO_COMPLETION); in initialize_vio() 161 vdo_set_completion_result(&vio->completion, result); in continue_vio() 163 vdo_enqueue_completion(&vio->completion, VDO_WORK_Q_DEFAULT_PRIORITY); in continue_vio() 176 vdo_set_completion_callback(&vio->completion, callback, thread); in continue_vio_after_io()
|
H A D | block-map.h | 167 struct vdo_completion completion; member 291 struct vdo_completion *completion); 293 static inline struct vdo_page_completion *as_vdo_page_completion(struct vdo_completion *completion) in as_vdo_page_completion() argument 295 vdo_assert_completion_type(completion, VDO_PAGE_COMPLETION); in as_vdo_page_completion() 296 return container_of(completion, struct vdo_page_completion, completion); in as_vdo_page_completion() 299 void vdo_release_page_completion(struct vdo_completion *completion); 306 void vdo_request_page_write(struct vdo_completion *completion); 308 int __must_check vdo_get_cached_page(struct vdo_completion *completion, 331 struct vdo_completion *completion);
|
/linux/include/linux/ |
H A D | completion.h | 26 struct completion { struct 32 static inline void complete_acquire(struct completion *x) {} in complete_acquire() argument 53 struct completion work = COMPLETION_INITIALIZER(work) 84 static inline void init_completion(struct completion *x) in init_completion() 102 extern void wait_for_completion(struct completion *); 103 extern void wait_for_completion_io(struct completion *); 112 struct completion *x, unsigned long timeout); 114 struct completion *x, unsigned long timeout); 116 extern bool completion_done(struct completion *x); 118 extern void complete(struct completion *); [all …]
|
/linux/Documentation/translations/zh_CN/scheduler/ |
H A D | completion.rst | 3 :Original: Documentation/scheduler/completion.rst 26 调用和completion()来代替。 33 事件被简化为 ``struct completion`` 中的一个简单标志,被恰如其名地称为‘done’。 35 由于完成与调度有关,代码可以在kernel/sched/completion.c中找到。 43 - 'struct completion' 同步对象的初始化 52 ``struct completion`` 类型的变量,它只有两个字段:: 54 struct completion { 140 struct completion setup_done; 221 void complete(struct completion *done) 225 void complete_all(struct completion *done) [all …]
|
/linux/kernel/sched/ |
H A D | completion.c | 28 void complete_on_current_cpu(struct completion *x) in complete_on_current_cpu() 45 void complete(struct completion *x) in complete() 67 void complete_all(struct completion *x) in complete_all() 81 do_wait_for_common(struct completion *x, in do_wait_for_common() 108 __wait_for_common(struct completion *x, in __wait_for_common() 125 wait_for_common(struct completion *x, long timeout, int state) in wait_for_common() 146 void __sched wait_for_completion(struct completion *x) in wait_for_completion() 179 void __sched wait_for_completion_io(struct completion *x) in wait_for_completion_io() 285 wait_for_completion_killable_timeout(struct completion *x, in wait_for_completion_killable_timeout() 304 bool try_wait_for_completion(struct completion *x) in try_wait_for_completion() [all …]
|
/linux/Documentation/scheduler/ |
H A D | completion.rst | 2 Completions - "wait for completion" barrier APIs 30 kernel/sched/completion.c. 52 struct completion { 147 void wait_for_completion(struct completion *done) 153 struct completion setup_done; 166 completion is signaled by complete(). 226 jiffies if completion occurred. 239 void wait_for_completion_io(struct completion *done) 250 void complete(struct completion *done) 254 void complete_all(struct completion *done) [all …]
|
/linux/sound/soc/codecs/ |
H A D | cs42l43.h | 60 struct completion pll_ready; 66 struct completion hp_startup; 67 struct completion hp_shutdown; 68 struct completion spkr_shutdown; 69 struct completion spkl_shutdown; 70 struct completion spkr_startup; 71 struct completion spkl_startup; 91 struct completion type_detect; 92 struct completion load_detect;
|
/linux/drivers/net/wwan/iosm/ |
H A D | iosm_ipc_task_queue.c | 28 if (args->completion) in ipc_task_queue_handler() 29 complete(args->completion); in ipc_task_queue_handler() 42 args->completion = NULL; in ipc_task_queue_handler() 64 if (args->completion) in ipc_task_queue_cleanup() 65 complete(args->completion); in ipc_task_queue_cleanup() 85 struct completion completion; in ipc_task_queue_add_task() local 90 init_completion(&completion); in ipc_task_queue_add_task() 111 ipc_task->args[pos].completion = wait ? &completion : NULL; in ipc_task_queue_add_task() 130 wait_for_completion(&completion); in ipc_task_queue_add_task()
|
/linux/net/wireless/ |
H A D | debugfs.c | 127 struct completion completion; member 136 complete(&w->completion); in wiphy_locked_debugfs_read_work() 145 complete(&w->completion); in wiphy_locked_debugfs_read_cancel() 167 .completion = COMPLETION_INITIALIZER_ONSTACK(work.completion), in wiphy_locked_debugfs_read() 181 wait_for_completion(&work.completion); in wiphy_locked_debugfs_read() 207 struct completion completion; member 216 complete(&w->completion); in wiphy_locked_debugfs_write_work() 225 complete(&w->completion); in wiphy_locked_debugfs_write_cancel() 246 .completion = COMPLETION_INITIALIZER_ONSTACK(work.completion), in wiphy_locked_debugfs_write() 266 wait_for_completion(&work.completion); in wiphy_locked_debugfs_write()
|
/linux/drivers/scsi/aic94xx/ |
H A D | aic94xx_tmf.c | 67 complete(ascb->completion); in asd_clear_nexus_tasklet_complete() 78 complete(ascb->completion); in asd_clear_nexus_timedout() 94 ascb->completion = &completion; \ 106 wait_for_completion(&completion); \ 252 complete(ascb->completion); in asd_tmf_timedout() 320 complete(ascb->completion); in asd_tmf_tasklet_complete() 332 tascb->completion = &completion; in asd_clear_nexus() 341 tascb->completion = NULL; in asd_clear_nexus() 415 ascb->completion = &completion; in asd_abort_task() 526 tascb->completion = NULL; in asd_abort_task() [all …]
|
/linux/arch/powerpc/sysdev/ |
H A D | pmi.c | 34 struct completion *completion; member 53 if (type & PMI_ACK && !data->completion) { in pmi_irq_handler() 59 if (data->completion && !(type & PMI_ACK)) { in pmi_irq_handler() 79 complete(data->completion); in pmi_irq_handler() 207 DECLARE_COMPLETION_ONSTACK(completion); in pmi_send_message() 217 data->completion = &completion; in pmi_send_message() 228 wait_for_completion_interruptible_timeout(data->completion, in pmi_send_message() 231 data->completion = NULL; in pmi_send_message()
|