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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Apr 2018 09:02:07 +0000 (11:02 +0200)
commit2e102fe86ede237ca875da9336648caa5e2fcac6
tree3e6d6d87f0e9a6819913dd0ccf117d78bd41d5e3
parent223ed638e937c53fdb49c6a55aa3c9de2c728b0f
dm mpath: return DM_MAPIO_REQUEUE on blk-mq rq allocation failure

[ Upstream commit 050af08ffb1b62af69196d61c22a0755f9a3cdbd ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-mpath.c