All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Alasdair Kergon <agk@redhat.com>
Cc: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>,
	dm-devel@redhat.com, Mike Snitzer <snitzer@redhat.com>
Subject: [PATCH 8/8] dm-mpath: do not activate failed paths
Date: Thu, 27 Feb 2014 08:30:29 +0100	[thread overview]
Message-ID: <1393486229-72034-9-git-send-email-hare@suse.de> (raw)
In-Reply-To: <1393486229-72034-1-git-send-email-hare@suse.de>

activate_path() is run without a lock, so the path might be
set to failed before activate_path() had a chance to run.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/md/dm-mpath.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 0a40fa9..22e7365 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -1196,8 +1196,11 @@ static void activate_path(struct work_struct *work)
 	struct pgpath *pgpath =
 		container_of(work, struct pgpath, activate_path.work);
 
-	scsi_dh_activate(bdev_get_queue(pgpath->path.dev->bdev),
-				pg_init_done, pgpath);
+	if (pgpath->is_active)
+		scsi_dh_activate(bdev_get_queue(pgpath->path.dev->bdev),
+				 pg_init_done, pgpath);
+	else
+		pg_init_done(pgpath, SCSI_DH_DEV_OFFLINED);
 }
 
 static int noretry_error(int error)
-- 
1.7.12.4

  parent reply	other threads:[~2014-02-27  7:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-27  7:30 [PATCHv8 0/8] dm-multipath: push back requests instead of queueing Hannes Reinecke
2014-02-27  7:30 ` [PATCH 1/8] dm mpath: do not call pg_init when it is already running Hannes Reinecke
2014-02-27  7:30 ` [PATCH 2/8] dm table: add dm_table_run_md_queue_async Hannes Reinecke
2014-02-27  7:30 ` [PATCH 3/8] dm mpath: push back requests instead of queueing Hannes Reinecke
2014-02-27  7:30 ` [PATCH 4/8] dm mpath: remove process_queued_ios() Hannes Reinecke
2014-02-28  9:05   ` Junichi Nomura
2014-02-28  9:37     ` Hannes Reinecke
2014-02-27  7:30 ` [PATCH 5/8] dm mpath: reduce memory pressure when requeuing Hannes Reinecke
2014-02-27  7:30 ` [PATCH 6/8] dm mpath: remove map_io() Hannes Reinecke
2014-02-28  9:06   ` Junichi Nomura
2014-02-27  7:30 ` [PATCH 7/8] dm mpath: remove extra nesting in map function Hannes Reinecke
2014-02-27  7:30 ` Hannes Reinecke [this message]
2014-02-28  8:49   ` [PATCH 8/8] dm-mpath: do not activate failed paths Junichi Nomura
2014-02-28  9:32     ` Hannes Reinecke
2014-02-28  9:37       ` Junichi Nomura
2014-02-28  9:52         ` Hannes Reinecke
2014-02-28 10:08           ` Junichi Nomura
2014-02-28 14:22           ` Mike Snitzer
2014-02-28 14:44             ` Hannes Reinecke
2014-02-28 15:02               ` Mike Snitzer
2014-02-28 15:08                 ` Hannes Reinecke
  -- strict thread matches above, loose matches on Subject: below --
2014-02-28 14:33 [PATCHv9 0/8] dm-multipath: push back requests instead of queueing Hannes Reinecke
2014-02-28 14:33 ` [PATCH 8/8] dm-mpath: do not activate failed paths 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=1393486229-72034-9-git-send-email-hare@suse.de \
    --to=hare@suse.de \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=j-nomura@ce.jp.nec.com \
    --cc=snitzer@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.