@@ -21,6 +21,7 @@
#define HEAVY_CHECK_COUNT 10
#define MSG_TUR_UP "tur checker reports path is up"
+#define MSG_TUR_GHOST "tur checker reports path in standby state"
#define MSG_TUR_DOWN "tur checker reports path is down"
/* from linux/include/scsi/scsi.h */
@@ -91,6 +92,17 @@
if (--retry_tur)
goto retry;
}
+ else if( key == 0x2){
+ /* Not Ready */
+
+ /*Note : Other ALUA states are either UP or DOWN*/
+ if( asc == 0x04 && ascq == 0x0b){
+ /*LOGICAL UNIT NOT ACCESSIBLE, TARGET PORT IN STANDBY STATE*/
+ MSG(c, MSG_TUR_GHOST);
+ return PATH_GHOST;
+ }
+ }
+
MSG(c, MSG_TUR_DOWN);
return PATH_DOWN;
}
@@ -742,12 +742,34 @@
}
static int
+get_uid (struct path * pp)
+{
+ char buff[CALLOUT_MAX_SIZE];
+
+ if (!pp->getuid)
+ select_getuid(pp);
+
+ if (apply_format(pp->getuid, &buff[0], pp)) {
+ condlog(0, "error formatting uid callout command");
+ memset(pp->wwid, 0, WWID_SIZE);
+ } else if (execute_program(buff, pp->wwid, WWID_SIZE)) {
+ condlog(0, "error calling out %s", buff);
+ memset(pp->wwid, 0, WWID_SIZE);
+ return 1;
+ }
+ condlog(3, "%s: uid = %s (callout)", pp->dev ,pp->wwid);
+ return 0;
+}
+
+static int
get_prio (struct path * pp)
{
char buff[CALLOUT_MAX_SIZE];
char prio[16];
if (!pp->getprio_selected) {
+ if (!strlen(pp->wwid))
+ get_uid(pp);
select_getprio(pp);
pp->getprio_selected = 1;
}
@@ -768,26 +790,6 @@
return 0;
}
-static int
-get_uid (struct path * pp)
-{
- char buff[CALLOUT_MAX_SIZE];
-
- if (!pp->getuid)
- select_getuid(pp);
-
- if (apply_format(pp->getuid, &buff[0], pp)) {
- condlog(0, "error formatting uid callout command");
- memset(pp->wwid, 0, WWID_SIZE);
- } else if (execute_program(buff, pp->wwid, WWID_SIZE)) {
- condlog(0, "error calling out %s", buff);
- memset(pp->wwid, 0, WWID_SIZE);
- return 1;
- }
- condlog(3, "%s: uid = %s (callout)", pp->dev ,pp->wwid);
- return 0;
-}
-
extern int
pathinfo (struct path *pp, vector hwtable, int mask)
{
@@ -815,12 +817,12 @@
if (mask & DI_CHECKER && get_state(pp))
goto blank;
- if (mask & DI_PRIO && pp->state != PATH_DOWN)
- get_prio(pp);
-
if (mask & DI_WWID && !strlen(pp->wwid))
get_uid(pp);
+ if (mask & DI_PRIO && pp->state != PATH_DOWN)
+ get_prio(pp);
+
#ifndef DAEMON
close(pp->fd);
pp->fd = -1;