summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2009-02-19 16:19:45 +0100
committerChristophe Varoqui <christophe.varoqui@free.fr>2009-04-22 01:51:28 +0200
commit5da642ff71254ecda685e82c681e78cab4c75b87 (patch)
tree98710635761643f5f0cd1a5c6c8f3da38699b361
parent44b1e84d7eb72a3c03cec486a227dc1beaa9ccd6 (diff)
downloadmultipath-tools-5da642ff71254ecda685e82c681e78cab4c75b87.tar.gz
multipath-tools-5da642ff71254ecda685e82c681e78cab4c75b87.tar.bz2
multipath-tools-5da642ff71254ecda685e82c681e78cab4c75b87.zip
Return 'ghost' state when port is in standby
Currently, issuing a TUR command on a path in standby mode, it returns a Unit Attention status. This is reported as a Failed path by the SLES11 tur checker. Instead, this has to be reported as Ghost path based on the additional sense code and sense code qualifier values. References: 475816 Signed-off-by: Hannes Reinecke <hare@suse.de>
-rw-r--r--libmultipath/checkers/tur.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libmultipath/checkers/tur.c b/libmultipath/checkers/tur.c
index aa6e3ad..e06dc52 100644
--- a/libmultipath/checkers/tur.c
+++ b/libmultipath/checkers/tur.c
@@ -22,6 +22,7 @@
#define MSG_TUR_UP "tur checker reports path is up"
#define MSG_TUR_DOWN "tur checker reports path is down"
+#define MSG_TUR_GHOST "tur checker reports path is in standby state"
struct tur_checker_context {
void * dummy;
@@ -95,6 +96,18 @@ libcheck_check (struct checker * c)
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;
}