summaryrefslogtreecommitdiff
path: root/libmultipath/devmapper.h
diff options
context:
space:
mode:
authorBenjamin Marzinski <bmarzins@redhat.com>2010-05-17 14:03:38 -0500
committerChristophe Varoqui <christophe.varoqui@opensvc.com>2010-05-20 06:49:03 +0200
commit8d63b33d0996e141a2451df552b062b908db15bc (patch)
tree9371f7a2edae027b1061ac4283043029dfb7560d /libmultipath/devmapper.h
parent07352dffc44c6e6b297d0c8cb804e6f08003be1d (diff)
downloadmultipath-tools-8d63b33d0996e141a2451df552b062b908db15bc.tar.gz
multipath-tools-8d63b33d0996e141a2451df552b062b908db15bc.tar.bz2
multipath-tools-8d63b33d0996e141a2451df552b062b908db15bc.zip
multipath: add udev sync support.
device-mapper in now able to synchronize operations through udev. This patch allows multipath and kpartx to make use of this feature. If kpartx is run with "-s", it waits for the partitions to be created before returning. Multipath will now always wait for the devices to be created before returning. This feature requires dm_task_set_cookie() which was finalized in device-mapper version 1.2.38 Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Diffstat (limited to 'libmultipath/devmapper.h')
-rw-r--r--libmultipath/devmapper.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/libmultipath/devmapper.h b/libmultipath/devmapper.h
index 9bbf48b..f3ffeaa 100644
--- a/libmultipath/devmapper.h
+++ b/libmultipath/devmapper.h
@@ -8,7 +8,7 @@
void dm_init(void);
int dm_prereq (void);
-int dm_simplecmd_flush (int, const char *);
+int dm_simplecmd_flush (int, const char *, int);
int dm_simplecmd_noflush (int, const char *);
int dm_addmap_create (struct multipath *mpp);
int dm_addmap_create_ro (struct multipath *mpp);
@@ -18,7 +18,9 @@ int dm_map_present (const char *);
int dm_get_map(char *, unsigned long long *, char *);
int dm_get_status(char *, char *);
int dm_type(const char *, char *);
-int dm_flush_map (const char *);
+int _dm_flush_map (const char *, int);
+#define dm_flush_map(mapname) _dm_flush_map(mapname, 1)
+#define dm_flush_map_nosync(mapname) _dm_flush_map(mapname, 0)
int dm_flush_maps (void);
int dm_fail_path(char * mapname, char * path);
int dm_reinstate_path(char * mapname, char * path);
@@ -31,7 +33,7 @@ int dm_get_maps (vector mp);
int dm_geteventnr (char *name);
int dm_get_minor (char *name);
char * dm_mapname(int major, int minor);
-int dm_remove_partmaps (const char * mapname);
+int dm_remove_partmaps (const char * mapname, int need_sync);
int dm_get_uuid(char *name, char *uuid);
int dm_get_info (char * mapname, struct dm_info ** dmi);
int dm_rename (char * old, char * new);