<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From: Mike Snitzer &lt;snitzer@redhat.com&gt;

Revert commit 224cb3e981f1b2f9f93dbd49eaef505d17d894c2
  dm: Call blk_abort_queue on failed paths

Multipath began to use blk_abort_queue() to allow for
lower latency path deactivation.  This was found to
cause list corruption:

   the cmd gets blk_abort_queued/timedout run on it and the scsi eh
   somehow is able to complete and run scsi_queue_insert while
   scsi_request_fn is still trying to process the request.

   https://www.redhat.com/archives/dm-devel/2010-November/msg00085.html

Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Cc: Mike Anderson &lt;andmike@linux.vnet.ibm.com&gt;
Cc: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Cc: stable@kernel.org

---
 drivers/md/dm-mpath.c |   12 ------------
 1 file changed, 12 deletions(-)

Index: linux-2.6.37/drivers/md/dm-mpath.c
===================================================================
--- linux-2.6.37.orig/drivers/md/dm-mpath.c
+++ linux-2.6.37/drivers/md/dm-mpath.c
@@ -33,7 +33,6 @@ struct pgpath {
 	unsigned fail_count;		/* Cumulative failure count */
 
 	struct dm_path path;
-	struct work_struct deactivate_path;
 	struct work_struct activate_path;
 };
 
@@ -116,7 +115,6 @@ static struct workqueue_struct *kmultipa
 static void process_queued_ios(struct work_struct *work);
 static void trigger_event(struct work_struct *work);
 static void activate_path(struct work_struct *work);
-static void deactivate_path(struct work_struct *work);
 
 
 /*-----------------------------------------------
@@ -129,7 +127,6 @@ static struct pgpath *alloc_pgpath(void)
 
 	if (pgpath) {
 		pgpath-&gt;is_active = 1;
-		INIT_WORK(&amp;pgpath-&gt;deactivate_path, deactivate_path);
 		INIT_WORK(&amp;pgpath-&gt;activate_path, activate_path);
 	}
 
@@ -141,14 +138,6 @@ static void free_pgpath(struct pgpath *p
 	kfree(pgpath);
 }
 
-static void deactivate_path(struct work_struct *work)
-{
-	struct pgpath *pgpath =
-		container_of(work, struct pgpath, deactivate_path);
-
-	blk_abort_queue(pgpath-&gt;path.dev-&gt;bdev-&gt;bd_disk-&gt;queue);
-}
-
 static struct priority_group *alloc_priority_group(void)
 {
 	struct priority_group *pg;
@@ -995,7 +984,6 @@ static int fail_path(struct pgpath *pgpa
 		      pgpath-&gt;path.dev-&gt;name, m-&gt;nr_valid_paths);
 
 	schedule_work(&amp;m-&gt;trigger_event);
-	queue_work(kmultipathd, &amp;pgpath-&gt;deactivate_path);
 
 out:
 	spin_unlock_irqrestore(&amp;m-&gt;lock, flags);
</pre></body></html>