forked from luck/tmp_suning_uos_patched
block-5.9-2020-10-02
-----BEGIN PGP SIGNATURE----- iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAl93Z28QHGF4Ym9lQGtl cm5lbC5kawAKCRD301j7KXHgpucFEACjn38JQGjFxcT9034e4rTys3kPFcvC6yik 8BZI33rYeuX3GAkuOAUeAoK5k8EfZBhjgHKX0DTaW4RZbggZC4fT9vVEKsRz1Ee2 E0xLc1jUoUqQ397H+AhOHnVHylQJqUzy6dywyz7QHTH/fWmemKqvZLZrA/ujDkhS AxiKI+/E6DxYByi9mgOfSCCQSZVEUTS0Z9S9+fcKAJ9VSiJNu3d3UWFkcrCECmb8 ChBgNuf/qpAT0lW6/L3eGv+qzDCgYw7VTEtGEONEJKLm84wYdcGWEFr3pNHTkxl6 ZXHyfVno1DctGpiDEE84FYBvBW7lKogwJVJkh8niEOm9vkXUJYrSAJvuTyw9KRHJ wEse1Y3+uMhPLFmIkFMMayn/ErzddD64WGN7CJLMsiXs3z08cFNmLLU57nvrC3um AC0rJ10eYMxEQkJuTAoMOWzz3zjhwDxNZL1v/aUr73Tag5uFSoj3esJMKKAdjH82 OYl6SB6rTcvnTcnaja0AzWCy5dSV1sbGWxc2PuEcobNkmrht24KsQk8Enw1YsnRa aLmrh8a6Ya8rbv3L9A1Uz51QXMAwtZJ/43l6nWwppuxntR1/ufZo8e4qt0XNqp/s 4NJPoHHE4iqpw2+BnZjlzuomUQAStMew4h91J5d2QJZe+sl5+KMDvquW4uIUU4vr FBvHbrn1fA== =p7wt -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
f016a54052
|
@ -1412,6 +1412,11 @@ bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list,
|
||||||
|
|
||||||
hctx->dispatched[queued_to_index(queued)]++;
|
hctx->dispatched[queued_to_index(queued)]++;
|
||||||
|
|
||||||
|
/* If we didn't flush the entire list, we could have told the driver
|
||||||
|
* there was more coming, but that turned out to be a lie.
|
||||||
|
*/
|
||||||
|
if ((!list_empty(list) || errors) && q->mq_ops->commit_rqs && queued)
|
||||||
|
q->mq_ops->commit_rqs(hctx);
|
||||||
/*
|
/*
|
||||||
* Any items that need requeuing? Stuff them into hctx->dispatch,
|
* Any items that need requeuing? Stuff them into hctx->dispatch,
|
||||||
* that is where we will continue on next queue run.
|
* that is where we will continue on next queue run.
|
||||||
|
@ -1425,14 +1430,6 @@ bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list,
|
||||||
|
|
||||||
blk_mq_release_budgets(q, nr_budgets);
|
blk_mq_release_budgets(q, nr_budgets);
|
||||||
|
|
||||||
/*
|
|
||||||
* If we didn't flush the entire list, we could have told
|
|
||||||
* the driver there was more coming, but that turned out to
|
|
||||||
* be a lie.
|
|
||||||
*/
|
|
||||||
if (q->mq_ops->commit_rqs && queued)
|
|
||||||
q->mq_ops->commit_rqs(hctx);
|
|
||||||
|
|
||||||
spin_lock(&hctx->lock);
|
spin_lock(&hctx->lock);
|
||||||
list_splice_tail_init(list, &hctx->dispatch);
|
list_splice_tail_init(list, &hctx->dispatch);
|
||||||
spin_unlock(&hctx->lock);
|
spin_unlock(&hctx->lock);
|
||||||
|
@ -2079,6 +2076,7 @@ void blk_mq_try_issue_list_directly(struct blk_mq_hw_ctx *hctx,
|
||||||
struct list_head *list)
|
struct list_head *list)
|
||||||
{
|
{
|
||||||
int queued = 0;
|
int queued = 0;
|
||||||
|
int errors = 0;
|
||||||
|
|
||||||
while (!list_empty(list)) {
|
while (!list_empty(list)) {
|
||||||
blk_status_t ret;
|
blk_status_t ret;
|
||||||
|
@ -2095,6 +2093,7 @@ void blk_mq_try_issue_list_directly(struct blk_mq_hw_ctx *hctx,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
blk_mq_end_request(rq, ret);
|
blk_mq_end_request(rq, ret);
|
||||||
|
errors++;
|
||||||
} else
|
} else
|
||||||
queued++;
|
queued++;
|
||||||
}
|
}
|
||||||
|
@ -2104,7 +2103,8 @@ void blk_mq_try_issue_list_directly(struct blk_mq_hw_ctx *hctx,
|
||||||
* the driver there was more coming, but that turned out to
|
* the driver there was more coming, but that turned out to
|
||||||
* be a lie.
|
* be a lie.
|
||||||
*/
|
*/
|
||||||
if (!list_empty(list) && hctx->queue->mq_ops->commit_rqs && queued)
|
if ((!list_empty(list) || errors) &&
|
||||||
|
hctx->queue->mq_ops->commit_rqs && queued)
|
||||||
hctx->queue->mq_ops->commit_rqs(hctx);
|
hctx->queue->mq_ops->commit_rqs(hctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user