[PATCH] dm: add uevent change event on resume
authorHannes Reinecke <hare@suse.de>
Tue, 3 Oct 2006 08:15:35 +0000 (01:15 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 3 Oct 2006 15:04:15 +0000 (08:04 -0700)
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 <hare@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/dm.c

index 81717e2733273939a58a60ff397e4cad059be16d..883860c3565bb4081672dbd87e78515d7dfedee6 100644 (file)
@@ -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: