[dm-devel] multipath state discrepancies between user and kernel space

christophe varoqui christophe.varoqui at free.fr
Fri Jul 1 22:01:09 UTC 2005


On ven, 2005-07-01 at 17:30 -0400, goggin, edward wrote:
> 
> (2) Two path state values, one for user space and one for the kernel
> resident multipath target driver,
> will be shown whenever the cached device configuration information is hot.
> Otherwise, "multipath -l"
> shows only the kernel driver's path state value since the user space path
> state value is not displayed
> if its value is PATH_UNCHECKED which it will be (for "multipath -l") if the
> saved device configuration
> cache is not used.
> 
> Seems like either one value should always be displayed or two values should
> always be displayed --
> I would certainly prefer that only one value be displayed at all times.
> Seems like a simple change.
> 
Like that ?

--- b40790b47efc2b5e50b241945bfca58c569e91ee/multipath/main.c
(mode:100644)
+++ uncommitted/multipath/main.c  (mode:100644)
@@ -173,22 +173,25 @@
        if (pp->dev_t)
                printf("%-7s ", pp->dev_t);

-       switch (pp->state) {
-       case PATH_UP:
-               printf("[ready ]");
-               break;
-       case PATH_DOWN:
-               printf("[faulty]");
-               break;
-       case PATH_GHOST:
-               printf("[ghost ]");
-               break;
-       case PATH_SHAKY:
-               printf("[shaky ]");
-               break;
-       default:
-               break;
+       if (conf->list > 1) {
+               switch (pp->state) {
+               case PATH_UP:
+                       printf("[ready ]");
+                       break;
+               case PATH_DOWN:
+                       printf("[faulty]");
+                       break;
+               case PATH_GHOST:
+                       printf("[ghost ]");
+                       break;
+               case PATH_SHAKY:
+                       printf("[shaky ]");
+                       break;
+               default:
+                       break;
+               }
        }
+
        switch (pp->dmstate) {
        case PSTATE_ACTIVE:
                printf("[active]");


-- 
christophe varoqui <christophe.varoqui at free.fr>





More information about the dm-devel mailing list