summaryrefslogtreecommitdiff
path: root/libmultipath
diff options
context:
space:
mode:
authorChristophe Varoqui <root@xa-s05.(none)>2005-11-23 18:03:28 +0100
committerChristophe Varoqui <root@xa-s05.(none)>2005-11-23 18:03:28 +0100
commitec8de1e7fe8fe8322a1bb5f60b42518344128d19 (patch)
treea779e9c62173e7fef71f4338e833474671e8017a /libmultipath
parent6f51f9fcd62400715a92d7cf515e4a49569c59c0 (diff)
downloadmultipath-tools-ec8de1e7fe8fe8322a1bb5f60b42518344128d19.tar.gz
multipath-tools-ec8de1e7fe8fe8322a1bb5f60b42518344128d19.tar.bz2
multipath-tools-ec8de1e7fe8fe8322a1bb5f60b42518344128d19.zip
[multipathd] "add/del map" to keep the DM in sync
The reach that goal, the following changes were applied : - call dm_lib_release() after each map creation/deletion - coalesce_paths() new refwwid parameter to do scope-limiting - flush_map() didn't really need the devname parameter, remove - uev_{add,remove}_map extended to manipulate DM maps - trap devmap umount events to try a little house-keeping (For testing. Might be removed latter)
Diffstat (limited to 'libmultipath')
-rw-r--r--libmultipath/configure.c6
-rw-r--r--libmultipath/configure.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/libmultipath/configure.c b/libmultipath/configure.c
index 6ea2f7b..084d770 100644
--- a/libmultipath/configure.c
+++ b/libmultipath/configure.c
@@ -386,7 +386,7 @@ deadmap (struct multipath * mpp)
}
extern int
-coalesce_paths (struct vectors * vecs, vector newmp)
+coalesce_paths (struct vectors * vecs, vector newmp, char * refwwid)
{
int r = 1;
int k, i;
@@ -415,6 +415,10 @@ coalesce_paths (struct vectors * vecs, vector newmp)
if (!pp1->size)
continue;
+ /* 4. path is out of scope */
+ if (refwwid && strncmp(pp1->wwid, refwwid, WWID_SIZE))
+ continue;
+
/*
* at this point, we know we really got a new mp
*/
diff --git a/libmultipath/configure.h b/libmultipath/configure.h
index 16be8e3..42ee9b0 100644
--- a/libmultipath/configure.h
+++ b/libmultipath/configure.h
@@ -24,6 +24,6 @@ enum actions {
int setup_map (struct multipath * mpp);
int domap (struct multipath * mpp);
int reinstate_paths (struct multipath *mpp);
-int coalesce_paths (struct vectors *vecs, vector curmp);
+int coalesce_paths (struct vectors *vecs, vector curmp, char * refwwid);
char * get_refwwid (char * dev, int dev_type, vector pathvec);