[PATCH] dm-mpath: Two minor fixes while processing activate_path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch adds two minor fixes while processing device mapper path activation.

1. Skip failed paths while calling activate_path.
   If the path is already failed then activate_path will fail for sure. We 
   don't have to call in that case. In some case this might cause prolonged retries unnecessarily.

2. changed the mis-leading message if the activate path fails with SCSI_DH_NOSYS.

Signed-off-by: Babu Moger <babu.moger@xxxxxxx>

---
--- linux-2.6.33-rc2/drivers/md/dm-mpath.c.orig	2010-01-05 12:47:26.000000000 -0400
+++ linux-2.6.33-rc2/drivers/md/dm-mpath.c	2010-01-05 17:07:35.000000000 -0400
@@ -461,6 +461,9 @@ static void process_queued_ios(struct wo
 		m->pg_init_count++;
 		m->pg_init_required = 0;
 		list_for_each_entry(tmp, &pgpath->pg->pgpaths, list) {
+			/* Skip failed paths */
+			if (!tmp->is_active)
+				continue;
 			if (queue_work(kmpath_handlerd, &tmp->activate_path))
 				m->pg_init_in_progress++;
 		}
@@ -1143,8 +1146,7 @@ static void pg_init_done(void *data, int
 			errors = 0;
 			break;
 		}
-		DMERR("Cannot failover device because scsi_dh_%s was not "
-		      "loaded.", m->hw_handler_name);
+		DMERR("Could not failover device. Error %d.", errors);
 		/*
 		 * Fail path for now, so we do not ping pong
 		 */


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux