aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2016-09-14 10:47:03 -0400
committerMike Snitzer <snitzer@redhat.com>2016-09-15 11:16:11 -0400
commit7e48c768f44056a06bca596577c37f7721b53f0c (patch)
treefa5ea08ca19dd655dc65624d4856dc6b5fed6dfc
parente0c107526960d1348cfe21f12bcfb3348fd7e8ab (diff)
dm mpath: use dm_mq_kick_requeue_list()
When reinstating a path the blk-mq request_queue's requeue_list should get kicked. It makes sense to kick the requeue_list as part of the existing hook (previously only used by bio-based support). Rename process_queued_bios_list to process_queued_io_list. Signed-off-by: Mike Snitzer <snitzer@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.com>
-rw-r--r--drivers/md/dm-mpath.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index c777d38f4b11..f69715bf0575 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -680,9 +680,11 @@ static int multipath_map_bio(struct dm_target *ti, struct bio *bio)
680 return __multipath_map_bio(m, bio, mpio); 680 return __multipath_map_bio(m, bio, mpio);
681} 681}
682 682
683static void process_queued_bios_list(struct multipath *m) 683static void process_queued_io_list(struct multipath *m)
684{ 684{
685 if (m->queue_mode == DM_TYPE_BIO_BASED) 685 if (m->queue_mode == DM_TYPE_MQ_REQUEST_BASED)
686 dm_mq_kick_requeue_list(dm_table_get_md(m->ti->table));
687 else if (m->queue_mode == DM_TYPE_BIO_BASED)
686 queue_work(kmultipathd, &m->process_queued_bios); 688 queue_work(kmultipathd, &m->process_queued_bios);
687} 689}
688 690
@@ -752,7 +754,7 @@ static int queue_if_no_path(struct multipath *m, bool queue_if_no_path,
752 754
753 if (!queue_if_no_path) { 755 if (!queue_if_no_path) {
754 dm_table_run_md_queue_async(m->ti->table); 756 dm_table_run_md_queue_async(m->ti->table);
755 process_queued_bios_list(m); 757 process_queued_io_list(m);
756 } 758 }
757 759
758 return 0; 760 return 0;
@@ -1304,7 +1306,7 @@ out:
1304 spin_unlock_irqrestore(&m->lock, flags); 1306 spin_unlock_irqrestore(&m->lock, flags);
1305 if (run_queue) { 1307 if (run_queue) {
1306 dm_table_run_md_queue_async(m->ti->table); 1308 dm_table_run_md_queue_async(m->ti->table);
1307 process_queued_bios_list(m); 1309 process_queued_io_list(m);
1308 } 1310 }
1309 1311
1310 return r; 1312 return r;
@@ -1502,7 +1504,7 @@ static void pg_init_done(void *data, int errors)
1502 } 1504 }
1503 clear_bit(MPATHF_QUEUE_IO, &m->flags); 1505 clear_bit(MPATHF_QUEUE_IO, &m->flags);
1504 1506
1505 process_queued_bios_list(m); 1507 process_queued_io_list(m);
1506 1508
1507 /* 1509 /*
1508 * Wake up any thread waiting to suspend. 1510 * Wake up any thread waiting to suspend.
@@ -1937,7 +1939,7 @@ static int multipath_prepare_ioctl(struct dm_target *ti,
1937 if (test_bit(MPATHF_PG_INIT_REQUIRED, &m->flags)) 1939 if (test_bit(MPATHF_PG_INIT_REQUIRED, &m->flags))
1938 pg_init_all_paths(m); 1940 pg_init_all_paths(m);
1939 dm_table_run_md_queue_async(m->ti->table); 1941 dm_table_run_md_queue_async(m->ti->table);
1940 process_queued_bios_list(m); 1942 process_queued_io_list(m);
1941 } 1943 }
1942 1944
1943 /* 1945 /*