Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'block-5.9-2020-10-02' of git://git.kernel.dk/linux-block

Pull block fix from Jens Axboe:
"Single fix for a ->commit_rqs failure case"

* tag 'block-5.9-2020-10-02' of git://git.kernel.dk/linux-block:
blk-mq: call commit_rqs while list empty but error happen

+9 -9
+9 -9
block/blk-mq.c
··· 1412 1412 1413 1413 hctx->dispatched[queued_to_index(queued)]++; 1414 1414 1415 + /* If we didn't flush the entire list, we could have told the driver 1416 + * there was more coming, but that turned out to be a lie. 1417 + */ 1418 + if ((!list_empty(list) || errors) && q->mq_ops->commit_rqs && queued) 1419 + q->mq_ops->commit_rqs(hctx); 1415 1420 /* 1416 1421 * Any items that need requeuing? Stuff them into hctx->dispatch, 1417 1422 * that is where we will continue on next queue run. ··· 1429 1424 bool no_budget_avail = prep == PREP_DISPATCH_NO_BUDGET; 1430 1425 1431 1426 blk_mq_release_budgets(q, nr_budgets); 1432 - 1433 - /* 1434 - * If we didn't flush the entire list, we could have told 1435 - * the driver there was more coming, but that turned out to 1436 - * be a lie. 1437 - */ 1438 - if (q->mq_ops->commit_rqs && queued) 1439 - q->mq_ops->commit_rqs(hctx); 1440 1427 1441 1428 spin_lock(&hctx->lock); 1442 1429 list_splice_tail_init(list, &hctx->dispatch); ··· 2076 2079 struct list_head *list) 2077 2080 { 2078 2081 int queued = 0; 2082 + int errors = 0; 2079 2083 2080 2084 while (!list_empty(list)) { 2081 2085 blk_status_t ret; ··· 2093 2095 break; 2094 2096 } 2095 2097 blk_mq_end_request(rq, ret); 2098 + errors++; 2096 2099 } else 2097 2100 queued++; 2098 2101 } ··· 2103 2104 * the driver there was more coming, but that turned out to 2104 2105 * be a lie. 2105 2106 */ 2106 - if (!list_empty(list) && hctx->queue->mq_ops->commit_rqs && queued) 2107 + if ((!list_empty(list) || errors) && 2108 + hctx->queue->mq_ops->commit_rqs && queued) 2107 2109 hctx->queue->mq_ops->commit_rqs(hctx); 2108 2110 } 2109 2111