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>

authored by Bart Van Assche and committed by Jens Axboe 6077c2d7 36e3cf27

+1
+1
drivers/md/dm-rq.c
··· 755 755 /* Undo dm_start_request() before requeuing */ 756 756 rq_end_stats(md, rq); 757 757 rq_completed(md, rq_data_dir(rq), false); 758 + blk_mq_delay_run_hw_queue(hctx, 100/*ms*/); 758 759 return BLK_MQ_RQ_QUEUE_BUSY; 759 760 } 760 761