dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: axboe@kernel.dk, dm-devel@redhat.com
Cc: linux-block@vger.kernel.org
Subject: [PATCH v2 5/6] dm mpath: use dm_mq_kick_requeue_list()
Date: Wed, 14 Sep 2016 12:29:35 -0400	[thread overview]
Message-ID: <1473870576-54331-6-git-send-email-snitzer@redhat.com> (raw)
In-Reply-To: <1473870576-54331-1-git-send-email-snitzer@redhat.com>

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>
---
 drivers/md/dm-mpath.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index c777d38..f69715b 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)
 	return __multipath_map_bio(m, bio, mpio);
 }
 
-static void process_queued_bios_list(struct multipath *m)
+static void process_queued_io_list(struct multipath *m)
 {
-	if (m->queue_mode == DM_TYPE_BIO_BASED)
+	if (m->queue_mode == DM_TYPE_MQ_REQUEST_BASED)
+		dm_mq_kick_requeue_list(dm_table_get_md(m->ti->table));
+	else if (m->queue_mode == DM_TYPE_BIO_BASED)
 		queue_work(kmultipathd, &m->process_queued_bios);
 }
 
@@ -752,7 +754,7 @@ static int queue_if_no_path(struct multipath *m, bool queue_if_no_path,
 
 	if (!queue_if_no_path) {
 		dm_table_run_md_queue_async(m->ti->table);
-		process_queued_bios_list(m);
+		process_queued_io_list(m);
 	}
 
 	return 0;
@@ -1304,7 +1306,7 @@ out:
 	spin_unlock_irqrestore(&m->lock, flags);
 	if (run_queue) {
 		dm_table_run_md_queue_async(m->ti->table);
-		process_queued_bios_list(m);
+		process_queued_io_list(m);
 	}
 
 	return r;
@@ -1502,7 +1504,7 @@ static void pg_init_done(void *data, int errors)
 	}
 	clear_bit(MPATHF_QUEUE_IO, &m->flags);
 
-	process_queued_bios_list(m);
+	process_queued_io_list(m);
 
 	/*
 	 * Wake up any thread waiting to suspend.
@@ -1937,7 +1939,7 @@ static int multipath_prepare_ioctl(struct dm_target *ti,
 		if (test_bit(MPATHF_PG_INIT_REQUIRED, &m->flags))
 			pg_init_all_paths(m);
 		dm_table_run_md_queue_async(m->ti->table);
-		process_queued_bios_list(m);
+		process_queued_io_list(m);
 	}
 
 	/*
-- 
2.7.4 (Apple Git-66)


  parent reply	other threads:[~2016-09-14 16:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-14 16:29 [PATCH for-4.9 v2 0/6] [PATCH for-4.9 v2 0/3] allow delayed requeue of blk-mq requests Mike Snitzer
2016-09-14 16:29 ` [PATCH v2 1/6] blk-mq: introduce blk_mq_delay_kick_requeue_list() Mike Snitzer
2016-09-14 16:34   ` Jens Axboe
2016-09-14 17:28     ` [PATCH v3 " Mike Snitzer
2016-09-14 17:49       ` Jens Axboe
2016-09-15  6:10   ` [PATCH v2 " Hannes Reinecke
2016-09-14 16:29 ` [PATCH v2 2/6] dm rq: add DM_MAPIO_DELAY_REQUEUE to delay requeue of blk-mq requests Mike Snitzer
2016-09-15  6:14   ` Hannes Reinecke
2016-09-15 12:54     ` Mike Snitzer
2016-09-14 16:29 ` [PATCH v2 3/6] dm rq: reduce arguments passed to map_request() and dm_requeue_original_request() Mike Snitzer
2016-09-15  6:15   ` Hannes Reinecke
2016-09-14 16:29 ` [PATCH v2 4/6] dm rq: introduce dm_mq_kick_requeue_list() Mike Snitzer
2016-09-15  6:16   ` Hannes Reinecke
2016-09-14 16:29 ` Mike Snitzer [this message]
2016-09-15  6:16   ` [PATCH v2 5/6] dm mpath: use dm_mq_kick_requeue_list() Hannes Reinecke
2016-09-14 16:29 ` [PATCH v2 6/6] dm mpath: delay the requeue of blk-mq requests while all paths down Mike Snitzer
2016-09-15  6:18   ` Hannes Reinecke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1473870576-54331-6-git-send-email-snitzer@redhat.com \
    --to=snitzer@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=dm-devel@redhat.com \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).