From: Hannes Reinecke Date: Tue, 3 Oct 2006 08:15:35 +0000 (-0700) Subject: [PATCH] dm: add uevent change event on resume X-Git-Tag: v2.6.19-rc1~264 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8560ed6fa8d43537af558514fa48f670b3349f08;p=linux-2.6 [PATCH] dm: add uevent change event on resume 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 Signed-off-by: Kay Sievers Signed-off-by: Alasdair G Kergon Signed-off-by: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 81717e2733..883860c356 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -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: