Blob Blame History Raw
From: Hannes Reinecke <hare@suse.de>
Subject: Reattach device handler for multipath devices
References: bnc#435688
Patch-mainline: not yet

The multipath daemon might have specified a different device_handler
than the one a device is attached to by default.
So we should try to re-attach with the user-specified device_handler
and only return an error if that fails.
And we should _not_ detach existing hardware handlers. This will
set the path to failed during failover.

Signed-off-by: Hannes Reinecke <hare@suse.de

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

--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -168,8 +168,6 @@ static void free_pgpaths(struct list_hea
 
 	list_for_each_entry_safe(pgpath, tmp, pgpaths, list) {
 		list_del(&pgpath->list);
-		if (m->hw_handler_name)
-			scsi_dh_detach(bdev_get_queue(pgpath->path.dev->bdev));
 		dm_put_device(ti, pgpath->path.dev);
 		free_pgpath(pgpath);
 	}