From: Mike Anderson Subject: [PATCH 4/4] dm: add calls for path event functions Date: Thu, 13 Sep 2007 08:07:14 -0700 Message-ID: <41877.8359461159$1189696887@news.gmane.org> References: <20070913150710.355370291@us.ibm.com>> Reply-To: device-mapper development Return-path: Content-Disposition: inline; filename=dm-uevent-mpath.patch List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: dm-devel@redhat.com Cc: Kay Sievers List-Id: dm-devel.ids This patch adds calls to dm_path_event for a failed path and a reinstated path. Signed-off-by: Mike Anderson --- drivers/md/dm-mpath.c | 7 +++++++ 1 file changed, 7 insertions(+) Index: b/drivers/md/dm-mpath.c =================================================================== --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c @@ -10,6 +10,7 @@ #include "dm-hw-handler.h" #include "dm-bio-list.h" #include "dm-bio-record.h" +#include "dm-uevent.h" #include #include @@ -834,6 +835,9 @@ static int fail_path(struct pgpath *pgpa if (pgpath == m->current_pgpath) m->current_pgpath = NULL; + dm_path_uevent(DM_UEVENT_PATH_FAILED, m->ti->table, + pgpath->path.dev->name, m->nr_valid_paths); + queue_work(kmultipathd, &m->trigger_event); out: @@ -873,6 +877,9 @@ static int reinstate_path(struct 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->table, + pgpath->path.dev->name, m->nr_valid_paths); + queue_work(kmultipathd, &m->trigger_event); out: --