[multipathd] Fix handling of device-mapper devices
authorHannes Reinecke <hare@suse.de>
Mon, 30 Apr 2007 07:26:28 +0000 (09:26 +0200)
committerChristophe Varoqui <cvaroqui@zezette.localdomain>
Mon, 21 May 2007 21:26:21 +0000 (23:26 +0200)
Device-mapper devices are available only after a 'change' event,
so it's quite pointless to check for the 'add' event.

Signed-off-by: Hannes Reinecke <hare@suse.de>
multipathd/main.c

index 9975dd8..94b0b95 100644 (file)
@@ -648,10 +648,12 @@ uev_trigger (struct uevent * uev, void * trigger_data)
        lock(vecs->lock);
 
        /*
-        * device map add/remove event
+        * device map event
+        * Add events are ignored here as the tables
+        * are not fully initialised then.
         */
        if (!strncmp(devname, "dm-", 3)) {
-               if (!strncmp(uev->action, "add", 3)) {
+               if (!strncmp(uev->action, "change", 6)) {
                        r = uev_add_map(devname, vecs);
                        goto out;
                }