Commit 632bfb6
blk-mq: call commit_rqs while list empty but error happen
Blk-mq should call commit_rqs once 'bd.last != true' and no more
request will come(so virtscsi can kick the virtqueue, e.g.). We already
do that in 'blk_mq_dispatch_rq_list/blk_mq_try_issue_list_directly' while
list not empty and 'queued > 0'. However, we can seen the same scene
once the last request in list call queue_rq and return error like
BLK_STS_IOERR which will not requeue the request, and lead that list
empty but need call commit_rqs too(Or the request for virtscsi will stay
timeout until other request kick virtqueue).
We found this problem by do fsstress test with offline/online virtscsi
device repeat quickly.
Fixes: d666ba9 ("blk-mq: add mq_ops->commit_rqs()")
Reported-by: zhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: yangerkun <yangerkun@huawei.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 3aab917 commit 632bfb6
1 file changed
Lines changed: 9 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1412 | 1412 | | |
1413 | 1413 | | |
1414 | 1414 | | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
1415 | 1420 | | |
1416 | 1421 | | |
1417 | 1422 | | |
| |||
1425 | 1430 | | |
1426 | 1431 | | |
1427 | 1432 | | |
1428 | | - | |
1429 | | - | |
1430 | | - | |
1431 | | - | |
1432 | | - | |
1433 | | - | |
1434 | | - | |
1435 | | - | |
1436 | 1433 | | |
1437 | 1434 | | |
1438 | 1435 | | |
| |||
2079 | 2076 | | |
2080 | 2077 | | |
2081 | 2078 | | |
| 2079 | + | |
2082 | 2080 | | |
2083 | 2081 | | |
2084 | 2082 | | |
| |||
2095 | 2093 | | |
2096 | 2094 | | |
2097 | 2095 | | |
| 2096 | + | |
2098 | 2097 | | |
2099 | 2098 | | |
2100 | 2099 | | |
| |||
2104 | 2103 | | |
2105 | 2104 | | |
2106 | 2105 | | |
2107 | | - | |
| 2106 | + | |
| 2107 | + | |
2108 | 2108 | | |
2109 | 2109 | | |
2110 | 2110 | | |
| |||
0 commit comments