dm mpath: return DM_MAPIO_REQUEUE on blk-mq rq allocation failure
authorMing Lei <ming.lei@redhat.com>
Thu, 11 Jan 2018 06:01:56 +0000 (14:01 +0800)
committerMike Snitzer <snitzer@redhat.com>
Wed, 17 Jan 2018 14:16:17 +0000 (09:16 -0500)
commit050af08ffb1b62af69196d61c22a0755f9a3cdbd
treeecb7779a5e70a907d74fd1134cd8d5dc7ab617cf
parent4b259fc4a8a12dcd0ffd670877a7a1ca2ab0f3e3
dm mpath: return DM_MAPIO_REQUEUE on blk-mq rq allocation failure

blk-mq will rerun queue via RESTART or dispatch wake after one request
is completed, so not necessary to wait random time for requeuing, we
should trust blk-mq to do it.

More importantly, we need to return BLK_STS_RESOURCE to blk-mq so that
dequeuing from the I/O scheduler can be stopped, this results in
improved I/O merging.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-mpath.c