Update pp_netapp callout - increase ioctl timeout and return 0 when ioctls fail
PATCH 1/1 Update pp_netapp callout - increase ioctl timeout and return 0 when ioctls fail
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 <[email protected]>
Signed-off-by Claire Kraft <[email protected]>
path_priority/pp_netapp/pp_netapp.c +6 -2
@@ -29,7 +29,7 @@#define INQUIRY_CMDLEN 6#define DEFAULT_PRIO 10#define RESULTS_MAX 256 -#define SG_TIMEOUT 30000 +#define SG_TIMEOUT 60000static 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: