* [PATCH] blk-mq: fail the request in case issue failure
@ 2018-07-22 6:10 ` Ming Lei
0 siblings, 0 replies; 3+ messages in thread
From: Ming Lei @ 2018-07-22 6:10 UTC (permalink / raw)
To: Jens Axboe
Cc: linux-block, Ming Lei, Kashyap Desai, Laurence Oberman,
Omar Sandoval, Christoph Hellwig, Bart Van Assche,
Hannes Reinecke, kernel test robot, LKP
Inside blk_mq_try_issue_list_directly(), if the request is issued as
failed, we shouldn't try to do it again, otherwise the warning in
blk_mq_start_request() will be triggered. This change is aligned to
behaviour of other ways of request issue & dispatch.
Fixes: 6ce3dd6eec1 ("blk-mq: issue directly if hw queue isn't busy in case of 'none'")
Cc: Kashyap Desai <kashyap.desai@broadcom.com>
Cc: Laurence Oberman <loberman@redhat.com>
Cc: Omar Sandoval <osandov@fb.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Kashyap Desai <kashyap.desai@broadcom.com>
Cc: kernel test robot <rong.a.chen@intel.com>
Cc: LKP <lkp@01.org>
Reported-by: kernel test robot <rong.a.chen@intel.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
block/blk-mq.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 21f3eda98431..e13bdc2707ce 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1794,8 +1794,12 @@ void blk_mq_try_issue_list_directly(struct blk_mq_hw_ctx *hctx,
list_del_init(&rq->queuelist);
ret = blk_mq_request_issue_directly(rq);
if (ret != BLK_STS_OK) {
- list_add(&rq->queuelist, list);
- break;
+ if (ret == BLK_STS_RESOURCE ||
+ ret == BLK_STS_DEV_RESOURCE) {
+ list_add(&rq->queuelist, list);
+ break;
+ }
+ blk_mq_end_request(rq, ret);
}
}
}
--
2.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] blk-mq: fail the request in case issue failure
@ 2018-07-22 6:10 ` Ming Lei
0 siblings, 0 replies; 3+ messages in thread
From: Ming Lei @ 2018-07-22 6:10 UTC (permalink / raw)
To: lkp
[-- Attachment #1: Type: text/plain, Size: 1475 bytes --]
Inside blk_mq_try_issue_list_directly(), if the request is issued as
failed, we shouldn't try to do it again, otherwise the warning in
blk_mq_start_request() will be triggered. This change is aligned to
behaviour of other ways of request issue & dispatch.
Fixes: 6ce3dd6eec1 ("blk-mq: issue directly if hw queue isn't busy in case of 'none'")
Cc: Kashyap Desai <kashyap.desai@broadcom.com>
Cc: Laurence Oberman <loberman@redhat.com>
Cc: Omar Sandoval <osandov@fb.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Kashyap Desai <kashyap.desai@broadcom.com>
Cc: kernel test robot <rong.a.chen@intel.com>
Cc: LKP <lkp@01.org>
Reported-by: kernel test robot <rong.a.chen@intel.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
block/blk-mq.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 21f3eda98431..e13bdc2707ce 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1794,8 +1794,12 @@ void blk_mq_try_issue_list_directly(struct blk_mq_hw_ctx *hctx,
list_del_init(&rq->queuelist);
ret = blk_mq_request_issue_directly(rq);
if (ret != BLK_STS_OK) {
- list_add(&rq->queuelist, list);
- break;
+ if (ret == BLK_STS_RESOURCE ||
+ ret == BLK_STS_DEV_RESOURCE) {
+ list_add(&rq->queuelist, list);
+ break;
+ }
+ blk_mq_end_request(rq, ret);
}
}
}
--
2.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] blk-mq: fail the request in case issue failure
2018-07-22 6:10 ` Ming Lei
(?)
@ 2018-07-22 23:32 ` Jens Axboe
-1 siblings, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2018-07-22 23:32 UTC (permalink / raw)
To: Ming Lei
Cc: linux-block, Kashyap Desai, Laurence Oberman, Omar Sandoval,
Christoph Hellwig, Bart Van Assche, Hannes Reinecke,
kernel test robot, LKP
On 7/22/18 12:10 AM, Ming Lei wrote:
> Inside blk_mq_try_issue_list_directly(), if the request is issued as
> failed, we shouldn't try to do it again, otherwise the warning in
> blk_mq_start_request() will be triggered. This change is aligned to
> behaviour of other ways of request issue & dispatch.
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-22 23:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-22 6:10 [PATCH] blk-mq: fail the request in case issue failure Ming Lei
2018-07-22 6:10 ` Ming Lei
2018-07-22 23:32 ` Jens Axboe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.