From: Hannes Reinecke <hare@suse.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-scsi@vger.kernel.org,
"Martin K. Petersen" <martin.petersen@oracle.com>,
James Bottomley <james.bottomley@hansenpartnership.com>,
Christoph Hellwig <hch@lst.de>,
linux-block@vger.kernel.org,
Hans Holmberg <hans.holmberg@wdc.com>,
Damien Le Moal <damien.lemoal@wdc.com>,
Hannes Reinecke <hare@suse.com>
Subject: [PATCH 1/2] blk-mq: fixup request re-insert in blk_mq_try_issue_list_directly()
Date: Thu, 19 Sep 2019 11:45:46 +0200 [thread overview]
Message-ID: <20190919094547.67194-2-hare@suse.de> (raw)
In-Reply-To: <20190919094547.67194-1-hare@suse.de>
From: Hannes Reinecke <hare@suse.com>
When blk_mq_request_issue_directly() returns BLK_STS_RESOURCE we
need to requeue the I/O, but adding it to the global request list
will mess up with the passed-in request list. So re-add the request
to the original list and leave it to the caller to handle situations
where the list wasn't completely emptied.
Signed-off-by: Hannes Reinecke <hare@suse.com>
---
block/blk-mq.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index b038ec680e84..44ff3c1442a4 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1899,8 +1899,7 @@ void blk_mq_try_issue_list_directly(struct blk_mq_hw_ctx *hctx,
if (ret != BLK_STS_OK) {
if (ret == BLK_STS_RESOURCE ||
ret == BLK_STS_DEV_RESOURCE) {
- blk_mq_request_bypass_insert(rq,
- list_empty(list));
+ list_add(list, &rq->queuelist);
break;
}
blk_mq_end_request(rq, ret);
--
2.16.4
next prev parent reply other threads:[~2019-09-19 9:45 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-19 9:45 [RFC PATCH 0/2] blk-mq I/O scheduling fixes Hannes Reinecke
2019-09-19 9:45 ` Hannes Reinecke [this message]
2019-09-19 14:19 ` [PATCH 1/2] blk-mq: fixup request re-insert in blk_mq_try_issue_list_directly() Ming Lei
2019-09-20 6:42 ` Hannes Reinecke
2019-09-19 14:52 ` Guoqing Jiang
2019-09-19 9:45 ` [PATCH 2/2] blk-mq: always call into the scheduler in blk_mq_make_request() Hannes Reinecke
2019-09-19 10:21 ` Damien Le Moal
2019-09-19 14:23 ` Ming Lei
2019-09-19 15:48 ` Kashyap Desai
2019-09-19 16:13 ` Damien Le Moal
2019-09-21 15:26 ` [blk] b91f4a426e: fio.write_bw_MBps -9.3% regression kernel test robot
2019-09-19 9:56 ` [RFC PATCH 0/2] blk-mq I/O scheduling fixes Liu, Sunny
2019-09-19 10:03 ` Damien Le Moal
[not found] ` <BJXPR01MB0296594F3E478B5BFD4DA2ABF4890@BJXPR01MB0296.CHNPR01.prod.partner.outlook.cn>
2019-09-19 12:44 ` Damien Le Moal
2019-09-19 12:54 ` Liu, Sunny
2019-09-19 12:57 ` Hans Holmberg
2019-09-19 17:48 ` Jens Axboe
2019-09-19 21:11 ` Damien Le Moal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190919094547.67194-2-hare@suse.de \
--to=hare@suse.de \
--cc=axboe@kernel.dk \
--cc=damien.lemoal@wdc.com \
--cc=hans.holmberg@wdc.com \
--cc=hare@suse.com \
--cc=hch@lst.de \
--cc=james.bottomley@hansenpartnership.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox