Commit f010505
io_uring: flush timeouts that should already have expired
Right now io_flush_timeouts() checks if the current number of events
is equal to ->timeout.target_seq, but this will miss some timeouts if
there have been more than 1 event added since the last time they were
flushed (possible in io_submit_flush_completions(), for example). Fix
it by recording the last sequence at which timeouts were flushed so
that the number of events seen can be compared to the number of events
needed without overflow.
Signed-off-by: Marcelo Diop-Gonzalez <marcelo827@gmail.com>
Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 06585c4 commit f010505
1 file changed
Lines changed: 30 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| 357 | + | |
357 | 358 | | |
358 | 359 | | |
359 | 360 | | |
| |||
1639 | 1640 | | |
1640 | 1641 | | |
1641 | 1642 | | |
1642 | | - | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
1643 | 1652 | | |
1644 | 1653 | | |
1645 | 1654 | | |
1646 | 1655 | | |
1647 | 1656 | | |
1648 | | - | |
1649 | | - | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
1650 | 1668 | | |
1651 | 1669 | | |
1652 | 1670 | | |
1653 | 1671 | | |
1654 | | - | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
1655 | 1675 | | |
1656 | 1676 | | |
1657 | 1677 | | |
| |||
5837 | 5857 | | |
5838 | 5858 | | |
5839 | 5859 | | |
| 5860 | + | |
| 5861 | + | |
| 5862 | + | |
| 5863 | + | |
| 5864 | + | |
| 5865 | + | |
5840 | 5866 | | |
5841 | 5867 | | |
5842 | 5868 | | |
| |||
0 commit comments