Lines Matching full:timeout
14 #include "timeout.h"
32 /* timeout update */
40 struct io_timeout *timeout = io_kiocb_to_cmd(req, struct io_timeout);
43 return !timeout->off || data->flags & IORING_TIMEOUT_MULTISHOT;
54 static inline bool io_timeout_finish(struct io_timeout *timeout,
60 if (!timeout->off || (timeout->repeats && --timeout->repeats))
70 struct io_timeout *timeout = io_kiocb_to_cmd(req, struct io_timeout);
74 if (!io_timeout_finish(timeout, data)) {
81 list_add(&timeout->list, ctx->timeout_list.prev);
98 struct io_timeout *timeout = io_kiocb_to_cmd(req, struct io_timeout);
104 list_del_init(&timeout->list);
114 struct io_timeout *timeout, *tmp;
119 list_for_each_entry_safe(timeout, tmp, &ctx->timeout_list, list) {
120 struct io_kiocb *req = cmd_to_io_kiocb(timeout);
133 events_needed = timeout->target_seq - ctx->cq_last_tm_flush;
224 struct io_timeout *timeout = io_kiocb_to_cmd(link, struct io_timeout);
227 timeout->head = NULL;
229 list_del(&timeout->list);
241 struct io_timeout *timeout = io_kiocb_to_cmd(req, struct io_timeout);
246 list_del_init(&timeout->list);
264 struct io_timeout *timeout;
268 list_for_each_entry(timeout, &ctx->timeout_list, list) {
269 struct io_kiocb *tmp = cmd_to_io_kiocb(timeout);
282 timeout = io_kiocb_to_cmd(req, struct io_timeout);
283 list_del_init(&timeout->list);
305 struct io_timeout *timeout = io_kiocb_to_cmd(req, struct io_timeout);
306 struct io_kiocb *prev = timeout->prev;
332 struct io_timeout *timeout = io_kiocb_to_cmd(req, struct io_timeout);
337 prev = timeout->head;
338 timeout->head = NULL;
349 list_del(&timeout->list);
350 timeout->prev = prev;
379 struct io_timeout *timeout;
382 list_for_each_entry(timeout, &ctx->ltimeout_list, list) {
383 struct io_kiocb *tmp = cmd_to_io_kiocb(timeout);
408 struct io_timeout *timeout = io_kiocb_to_cmd(req, struct io_timeout);
414 timeout->off = 0; /* noseq */
418 list_add_tail(&timeout->list, &ctx->timeout_list);
449 /* timeout removal doesn't support flags */
463 * Remove or update an existing timeout command
498 struct io_timeout *timeout = io_kiocb_to_cmd(req, struct io_timeout);
519 INIT_LIST_HEAD(&timeout->list);
520 timeout->off = off;
527 timeout->repeats = 0;
529 timeout->repeats = off;
546 INIT_LIST_HEAD(&timeout->list);
557 timeout->head = link->last;
575 struct io_timeout *timeout = io_kiocb_to_cmd(req, struct io_timeout);
579 u32 tail, off = timeout->off;
585 * timeout event to be satisfied. If it isn't set, then this is
586 * a pure timeout request, sequence isn't used.
594 timeout->target_seq = tail + off;
617 list_add(&timeout->list, entry);
626 struct io_timeout *timeout = io_kiocb_to_cmd(req, struct io_timeout);
634 if (timeout->head) {
640 list_add_tail(&timeout->list, &ctx->ltimeout_list);
669 struct io_timeout *timeout, *tmp;
678 list_for_each_entry_safe(timeout, tmp, &ctx->timeout_list, list) {
679 struct io_kiocb *req = cmd_to_io_kiocb(timeout);