On 16/11/2019 00:16, Jens Axboe wrote: > On 11/15/19 12:34 PM, Jens Axboe wrote: >> How about something like this? Should work (and be valid) to have any >> sequence of timeout links, as long as there's something in front of it. >> Commit message has more details. > > Updated below (missed the sqe free), easiest to check out the repo > here: > > https://git.kernel.dk/cgit/linux-block/log/?h=for-5.5/io_uring-post > > as that will show the couple of prep patches, too. Let me know what > you think. > Sure, BTW, found "io_uring: make io_double_put_req() use normal completion path" in the tree. And it do exactly the same, what my patch was doing, the one which "blowed" the link test :) I'd add there "req->flags | REQ_F_FAIL_LINK" in-between failed io_req_defer() and calling io_double_put_req(). (in 2 places) Otherwise, even though a request failed, it will enqueue the rest of its link with io_queue_async_work(). -- Pavel Begunkov