Handle SCSI device states "quiesce" and "transport-offline" properly
authorBart Van Assche <bvanassche@acm.org>
Thu, 14 Feb 2013 14:17:28 +0000 (15:17 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Thu, 14 Feb 2013 18:02:03 +0000 (19:02 +0100)
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
libmultipath/discovery.c
libmultipath/structs.h

index 3fbc181..0b5fd1d 100644 (file)
@@ -797,12 +797,13 @@ path_offline (struct path * pp)
 
        condlog(3, "%s: path state = %s", pp->dev, buff);
 
-       if (!strncmp(buff, "offline", 7)) {
+       if (!strncmp(buff, "offline", 7) ||
+           !strncmp(buff, "transport-offline", 17)) {
                pp->offline = 1;
                return PATH_DOWN;
        }
        pp->offline = 0;
-       if (!strncmp(buff, "blocked", 7))
+       if (!strncmp(buff, "blocked", 7) || !strncmp(buff, "quiesce", 7))
                return PATH_PENDING;
        else if (!strncmp(buff, "running", 7))
                return PATH_UP;
index ab05a78..b9ace36 100644 (file)
@@ -20,7 +20,7 @@
 #define SCSI_VENDOR_SIZE       9
 #define SCSI_PRODUCT_SIZE      17
 #define SCSI_REV_SIZE          5
-#define SCSI_STATE_SIZE                9
+#define SCSI_STATE_SIZE                19
 
 #define NO_PATH_RETRY_UNDEF    0
 #define NO_PATH_RETRY_FAIL     -1