Lines Matching refs:timeout
40 struct io_timeout *timeout = io_kiocb_to_cmd(req, struct io_timeout); in io_is_timeout_noseq() local
43 return !timeout->off || data->flags & IORING_TIMEOUT_MULTISHOT; in io_is_timeout_noseq()
54 static inline bool io_timeout_finish(struct io_timeout *timeout, in io_timeout_finish() argument
60 if (!timeout->off || (timeout->repeats && --timeout->repeats)) in io_timeout_finish()
70 struct io_timeout *timeout = io_kiocb_to_cmd(req, struct io_timeout); in io_timeout_complete() local
74 if (!io_timeout_finish(timeout, data)) { in io_timeout_complete()
81 list_add(&timeout->list, ctx->timeout_list.prev); in io_timeout_complete()
98 struct io_timeout *timeout = io_kiocb_to_cmd(req, struct io_timeout); in io_kill_timeout() local
104 list_del_init(&timeout->list); in io_kill_timeout()
114 struct io_timeout *timeout, *tmp; in io_flush_timeouts() local
119 list_for_each_entry_safe(timeout, tmp, &ctx->timeout_list, list) { in io_flush_timeouts()
120 struct io_kiocb *req = cmd_to_io_kiocb(timeout); in io_flush_timeouts()
133 events_needed = timeout->target_seq - ctx->cq_last_tm_flush; in io_flush_timeouts()
224 struct io_timeout *timeout = io_kiocb_to_cmd(link, struct io_timeout); in __io_disarm_linked_timeout() local
227 timeout->head = NULL; in __io_disarm_linked_timeout()
229 list_del(&timeout->list); in __io_disarm_linked_timeout()
241 struct io_timeout *timeout = io_kiocb_to_cmd(req, struct io_timeout); in io_timeout_fn() local
246 list_del_init(&timeout->list); in io_timeout_fn()
264 struct io_timeout *timeout; in io_timeout_extract() local
268 list_for_each_entry(timeout, &ctx->timeout_list, list) { in io_timeout_extract()
269 struct io_kiocb *tmp = cmd_to_io_kiocb(timeout); in io_timeout_extract()
282 timeout = io_kiocb_to_cmd(req, struct io_timeout); in io_timeout_extract()
283 list_del_init(&timeout->list); in io_timeout_extract()
305 struct io_timeout *timeout = io_kiocb_to_cmd(req, struct io_timeout); in io_req_task_link_timeout() local
306 struct io_kiocb *prev = timeout->prev; in io_req_task_link_timeout()
332 struct io_timeout *timeout = io_kiocb_to_cmd(req, struct io_timeout); in io_link_timeout_fn() local
337 prev = timeout->head; in io_link_timeout_fn()
338 timeout->head = NULL; in io_link_timeout_fn()
349 list_del(&timeout->list); in io_link_timeout_fn()
350 timeout->prev = prev; in io_link_timeout_fn()
379 struct io_timeout *timeout; in io_linked_timeout_update() local
382 list_for_each_entry(timeout, &ctx->ltimeout_list, list) { in io_linked_timeout_update()
383 struct io_kiocb *tmp = cmd_to_io_kiocb(timeout); in io_linked_timeout_update()
408 struct io_timeout *timeout = io_kiocb_to_cmd(req, struct io_timeout); in io_timeout_update() local
414 timeout->off = 0; /* noseq */ in io_timeout_update()
416 list_add_tail(&timeout->list, &ctx->timeout_list); in io_timeout_update()
496 struct io_timeout *timeout = io_kiocb_to_cmd(req, struct io_timeout); in __io_timeout_prep() local
517 INIT_LIST_HEAD(&timeout->list); in __io_timeout_prep()
518 timeout->off = off; in __io_timeout_prep()
525 timeout->repeats = 0; in __io_timeout_prep()
527 timeout->repeats = off; in __io_timeout_prep()
544 INIT_LIST_HEAD(&timeout->list); in __io_timeout_prep()
555 timeout->head = link->last; in __io_timeout_prep()
573 struct io_timeout *timeout = io_kiocb_to_cmd(req, struct io_timeout); in io_timeout() local
577 u32 tail, off = timeout->off; in io_timeout()
592 timeout->target_seq = tail + off; in io_timeout()
615 list_add(&timeout->list, entry); in io_timeout()
624 struct io_timeout *timeout = io_kiocb_to_cmd(req, struct io_timeout); in io_queue_linked_timeout() local
632 if (timeout->head) { in io_queue_linked_timeout()
638 list_add_tail(&timeout->list, &ctx->ltimeout_list); in io_queue_linked_timeout()
667 struct io_timeout *timeout, *tmp; in io_kill_timeouts() local
676 list_for_each_entry_safe(timeout, tmp, &ctx->timeout_list, list) { in io_kill_timeouts()
677 struct io_kiocb *req = cmd_to_io_kiocb(timeout); in io_kill_timeouts()