summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-rq.c
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2017-04-07 20:16:54 +0200
committerJens Axboe <axboe@fb.com>2017-04-07 20:27:10 +0200
commit6077c2d706097c00d8f2fed57d3f3c45cd228ee8 (patch)
tree5acae1a06b2b108a20a84697422159321843c2ba /drivers/md/dm-rq.c
parentscsi: Avoid that SCSI queues get stuck (diff)
downloadlinux-6077c2d706097c00d8f2fed57d3f3c45cd228ee8.tar.xz
linux-6077c2d706097c00d8f2fed57d3f3c45cd228ee8.zip
dm rq: Avoid that request processing stalls sporadically
While running the srp-test software I noticed that request processing stalls sporadically at the beginning of a test, namely when mkfs is run against a dm-mpath device. Every time when that happened the following command was sufficient to resume request processing: echo run >/sys/kernel/debug/block/dm-0/state This patch avoids that such request processing stalls occur. The test I ran is as follows: while srp-test/run_tests -d -r 30 -t 02-mq; do :; done Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Mike Snitzer <snitzer@redhat.com> Cc: dm-devel@redhat.com Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to '')
-rw-r--r--drivers/md/dm-rq.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c
index 28955b94d2b2..0b081d170087 100644
--- a/drivers/md/dm-rq.c
+++ b/drivers/md/dm-rq.c
@@ -755,6 +755,7 @@ static int dm_mq_queue_rq(struct blk_mq_hw_ctx *hctx,
/* Undo dm_start_request() before requeuing */
rq_end_stats(md, rq);
rq_completed(md, rq_data_dir(rq), false);
+ blk_mq_delay_run_hw_queue(hctx, 100/*ms*/);
return BLK_MQ_RQ_QUEUE_BUSY;
}