chiark / gitweb /
[PATCH] update extras/multipath
authorchristophe.varoqui@free.fr <christophe.varoqui@free.fr>
Fri, 6 Feb 2004 08:14:51 +0000 (00:14 -0800)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:32:25 +0000 (21:32 -0700)
incremental to udev-016/extras/multipath,

* don't rely on the linux symlink in the udev/klibc dir since
  udev build doesn't use it anymore. This corrects build breakage
* remove make_dm_node fn & call. Rely on udev for this.

The first patch is to be applied.
The second is conditioned by udev dealing correctly with devmap names.

For this I can suggest a CALLOUT rule like this :
KERNEL=3D"dm-[0-9]*", PROGRAM=3D"/tmp/name_devmap %M %m", NAME=3D"%k", SY=
MLINK=3D"%c"

With name_devmap like :
#!/bin/sh
/usr/sbin/dmsetup ls|/bin/grep "$1, $2"|/usr/bin/awk '{print $1}'

extras/multipath/ChangeLog
extras/multipath/Makefile
extras/multipath/main.c

index bb2f6baf89931da241b0fc0f2fca2b352d541179..c3361ff8e81fa2754dd53bf3da4e8866e3fb3b7a 100644 (file)
@@ -1,3 +1,7 @@
+2004-02-04 multipath-016
+       * remove make_dm_node fn & call. Rely on udev for this.
+       * don't rely on the linux symlink in the udev/klibc dir since
+         udev build doesn't use it anymore. This corrects build breakage
 2004-01-19 multipath-013
        * update the DM target synthax to the 2.6.0-udm5 style
 2003-12-29 multipath-012
index 0aac146a8789781098c429a0f514f9162a27716e..caf24bbd909aeedbd4675d6f2faba16480bfebad 100644 (file)
@@ -13,6 +13,7 @@ sysfsdir    = $(udevdir)/libsysfs
 
 CC = gcc
 GCCINCDIR := ${shell $(CC) -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp"}
+KERNEL_DIR = /lib/modules/${shell uname -r}/build
 CFLAGS = -pipe -g -O2 -Wall -Wunused -Wstrict-prototypes -nostdinc \
          -I$(klibcdir)/klibc/include -I$(klibcdir)/klibc/include/bits32 \
          -I$(GCCINCDIR) -I$(KERNEL_DIR)/include -I$(sysfsdir) -I.
index e18e049128d7aba1b72ea958f7a612c15a39d979..d4dd89a3056b4529b22713cb1ad91784f5436ba4 100644 (file)
@@ -558,46 +558,6 @@ coalesce_paths(struct env * conf, struct multipath * mp,
        return nmp;
 }
 
-static int
-make_dm_node(char * str)
-{
-       int r = 0;
-       char buff[FILE_NAME_SIZE];
-       struct dm_names * names;
-        unsigned next = 0;
-       struct dm_task *dmt;
-
-       if (!(dmt = dm_task_create(DM_DEVICE_LIST)))
-               return 0;
-
-       if (!dm_task_run(dmt))
-               goto out;
-
-       if (!(names = dm_task_get_names(dmt)))
-               goto out;
-
-       if (!names->dev) {
-               r = 1;
-               goto out;
-       }
-
-        do {
-               if (0 == strcmp(names->name, str))
-                       break;
-                next = names->next;
-                names = (void *) names + next;
-        } while (next);
-
-       sprintf(buff, "/dev/mapper/%s", str);
-       unlink(buff);
-       mknod(buff, 0600 | S_IFBLK, names->dev);
-
-       out:
-       dm_task_destroy(dmt);
-       return r;
-
-}
-
 static int
 dm_simplecmd(int task, const char *name) {
        int r = 0;
@@ -711,7 +671,6 @@ setup_map(struct env * conf, struct path * all_paths,
        if (op == DM_DEVICE_RELOAD)
                dm_simplecmd(DM_DEVICE_RESUME, mp[index].wwid);
 
-       make_dm_node(mp[index].wwid);
        return 1;
 }