aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2018-01-11 01:01:55 -0500
committerMike Snitzer <snitzer@redhat.com>2018-01-17 09:16:18 -0500
commit459b54019cfeb7330ed4863ad40f78489e0ff23d (patch)
treeb700bef3cc4f480d11eca83888081a044c302b5a
parent050af08ffb1b62af69196d61c22a0755f9a3cdbd (diff)
dm mpath: return DM_MAPIO_DELAY_REQUEUE if QUEUE_IO or PG_INIT_REQUIRED
Avoid using DM_MAPIO_REQUEUE unless absolutely necessary because it results in dm-rq.c:dm_mq_queue_rq() returning BLK_STS_RESOURCE to blk-mq -- doing so should only ever be done if the underlying queue is out of resources. So switch to returning DM_MAPIO_DELAY_REQUEUE from multipath_clone_and_map() if either MPATHF_QUEUE_IO or MPATHF_PG_INIT_REQUIRED are set. Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
-rw-r--r--drivers/md/dm-mpath.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index e0187798ccae..815de2b091a5 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -517,9 +517,8 @@ static int multipath_clone_and_map(struct dm_target *ti, struct request *rq,
517 return DM_MAPIO_KILL; 517 return DM_MAPIO_KILL;
518 } else if (test_bit(MPATHF_QUEUE_IO, &m->flags) || 518 } else if (test_bit(MPATHF_QUEUE_IO, &m->flags) ||
519 test_bit(MPATHF_PG_INIT_REQUIRED, &m->flags)) { 519 test_bit(MPATHF_PG_INIT_REQUIRED, &m->flags)) {
520 if (pg_init_all_paths(m)) 520 pg_init_all_paths(m);
521 return DM_MAPIO_DELAY_REQUEUE; 521 return DM_MAPIO_DELAY_REQUEUE;
522 return DM_MAPIO_REQUEUE;
523 } 522 }
524 523
525 mpio->pgpath = pgpath; 524 mpio->pgpath = pgpath;