]> err.no Git - linux-2.6/blobdiff - drivers/md/dm-mpath.c
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
[linux-2.6] / drivers / md / dm-mpath.c
index dd5ad6310f54bf64510149f8b5fcea926e328b9d..e7ee59e655d58a66e53658794e5e0dc2b2042ed3 100644 (file)
@@ -10,6 +10,7 @@
 #include "dm-hw-handler.h"
 #include "dm-bio-list.h"
 #include "dm-bio-record.h"
+#include "dm-uevent.h"
 
 #include <linux/ctype.h>
 #include <linux/init.h>
@@ -105,7 +106,7 @@ typedef int (*action_fn) (struct pgpath *pgpath);
 
 static struct kmem_cache *_mpio_cache;
 
-struct workqueue_struct *kmultipathd;
+static struct workqueue_struct *kmultipathd;
 static void process_queued_ios(struct work_struct *work);
 static void trigger_event(struct work_struct *work);
 
@@ -857,6 +858,9 @@ static int fail_path(struct pgpath *pgpath)
        if (pgpath == m->current_pgpath)
                m->current_pgpath = NULL;
 
+       dm_path_uevent(DM_UEVENT_PATH_FAILED, m->ti,
+                     pgpath->path.dev->name, m->nr_valid_paths);
+
        queue_work(kmultipathd, &m->trigger_event);
 
 out:
@@ -896,6 +900,9 @@ static int reinstate_path(struct pgpath *pgpath)
        if (!m->nr_valid_paths++ && m->queue_size)
                queue_work(kmultipathd, &m->process_queued_ios);
 
+       dm_path_uevent(DM_UEVENT_PATH_REINSTATED, m->ti,
+                     pgpath->path.dev->name, m->nr_valid_paths);
+
        queue_work(kmultipathd, &m->trigger_event);
 
 out: