diff options
| author | Hao Xu <haoxu@linux.alibaba.com> | 2021-08-27 17:46:09 +0800 | 
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2021-08-27 07:27:24 -0600 | 
| commit | a8295b982c46d4a7c259a4cdd58a2681929068a9 (patch) | |
| tree | 355d0a213dbeee99690c97ba0984116288645322 /include/linux/fpga/fpga-bridge.h | |
| parent | 14afdd6ee3a0db7bcae887d1951ed21c4d1539cd (diff) | |
io_uring: fix failed linkchain code logic
Given a linkchain like this:
req0(link_flag)-->req1(link_flag)-->...-->reqn(no link_flag)
There is a problem:
 - if some intermediate linked req like req1 's submittion fails, reqs
   after it won't be cancelled.
   - sqpoll disabled: maybe it's ok since users can get the error info
     of req1 and stop submitting the following sqes.
   - sqpoll enabled: definitely a problem, the following sqes will be
     submitted in the next round.
The solution is to refactor the code logic to:
 - if a linked req's submittion fails, just mark it and the head(if it
   exists) as REQ_F_FAIL. Leverage req->result to indicate whether it
   is failed or cancelled.
 - submit or fail the whole chain when we come to the end of it.
Signed-off-by: Hao Xu <haoxu@linux.alibaba.com>
Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/20210827094609.36052-3-haoxu@linux.alibaba.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/fpga/fpga-bridge.h')
0 files changed, 0 insertions, 0 deletions
