[PATCH] Update pp_netapp callout - increase ioctl timeout and return 0 when ioctls fail

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

 



This patch against the latest git tree fixes a couple minor
bugs in the Netapp priority callout:
- increase the ioctl timeout from 30 to 60 
- return 0 for priority value when ioctls fail


Signed-off-by: Dave Wysochanski <davidw@xxxxxxxxxx>
Signed-off-by: Claire Kraft <ckraft@xxxxxxxxxx>

--- multipath-tools-git/path_priority/pp_netapp/pp_netapp.c	2005-12-02 17:40:39.000000000 -0500
+++ multipath-tools-patch/path_priority/pp_netapp/pp_netapp.c	2006-08-03 13:51:39.177207000 -0400
@@ -29,7 +29,7 @@
 #define INQUIRY_CMDLEN	6
 #define DEFAULT_PRIO	10
 #define RESULTS_MAX	256
-#define SG_TIMEOUT	30000
+#define SG_TIMEOUT	60000
 
 
 static void dump_cdb(unsigned char *cdb, int size)
@@ -209,7 +209,7 @@ static int netapp_prio(const char *dev)
 
 	memset(&results, 0, sizeof (results));
 	rc = send_gva(dev, 0x41, results, &results_size);
-	if (rc == 0) {
+	if (rc >= 0) {
 		tot_len = results[0] << 24 | results[1] << 16 |
 			  results[2] << 8 | results[3];
 		if (tot_len <= 8) {
@@ -229,12 +229,16 @@ static int netapp_prio(const char *dev)
 			is_iscsi_hardware = 1;
 			goto prio_select;
 		}
+	} else {
+		return 0;
 	}
 	
  try_fcp_proxy:	
 	rc = get_proxy(dev);
 	if (rc >= 0) {
 		is_proxy = rc;
+	} else {
+		return 0;
 	}
 
  prio_select:

--

dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux