Subject: [PATCH 15/25] dm: add uevent change event on resume
To: Andrew Morton <[email-masked]>
Cc: [email-masked], Hannes Reinecke <[email-masked]>, Kay Sievers <[email-masked]>

From: Hannes Reinecke <[email-masked]>

Device-mapper devices are not accessible until a 'resume' ioctl has been
issued.  For userspace to find out when this happens we need to generate an
uevent for udev to take appropriate action.

As discussed at OLS we should send 'change' events for 'resume'.
We can think of no useful purpose served by also having 'suspend' events.

Signed-off-by: Hannes Reinecke <[email-masked]>
Signed-off-by: Kay Sievers <[email-masked]>
Signed-off-by: Alasdair G Kergon <[email-masked]>

Index: linux-2.6.18-rc7/drivers/md/dm.c
===================================================================
--- linux-2.6.18-rc7.orig/drivers/md/dm.c	2006-10-13 17:10:06.000000000 +0100
+++ linux-2.6.18-rc7/drivers/md/dm.c	2006-10-13 17:10:13.000000000 +0100
@@ -1378,6 +1378,8 @@ int dm_resume(struct mapped_device *md)
 
 	dm_table_unplug_all(map);
 
+	kobject_uevent(&md->disk->kobj, KOBJ_CHANGE);
+
 	r = 0;
 
 out: