[multipath] DM-claimed paths are not to be considered as claimed
authorroot <root@potab.(none)>
Fri, 19 Aug 2005 09:48:31 +0000 (11:48 +0200)
committerroot <root@potab.(none)>
Fri, 19 Aug 2005 09:48:31 +0000 (11:48 +0200)
Use the dmstate path field to guess if the path is used bythe DM
driver. This assumes disassemble_*() have been called before the guess.

libmultipath/print.c
multipath/main.c

index 2c4e2c6..05bb169 100644 (file)
@@ -135,7 +135,7 @@ snprint_path (char * line, int len, struct path * pp, struct path_layout * pl)
                break;
        }
                
-       if (pp->claimed)
+       if (pp->claimed && pp->dmstate == PSTATE_UNDEF)
                c += sprintf(c, "[claimed]");
 
        return (c - line);
index b8deffc..3b24609 100644 (file)
@@ -378,9 +378,10 @@ setup_map (struct multipath * mpp)
 
        /*
         * don't bother if a constituant path is claimed
+        * (not by the device mapper driver)
         */
        vector_foreach_slot (mpp->paths, pp, i) {
-               if (pp->claimed) {
+               if (pp->claimed && pp->dmstate == PSTATE_UNDEF) {
                        condlog(3, "%s claimed", pp->dev);
                        return 1;
                }