[PATCH 15/25] dm: add uevent change event on resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Hannes Reinecke <[email protected]>

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 protected]>
Signed-off-by: Kay Sievers <[email protected]>
Signed-off-by: Alasdair G Kergon <[email protected]>

Index: linux-2.6.18-rc7/drivers/md/dm.c
===================================================================
--- linux-2.6.18-rc7.orig/drivers/md/dm.c	2006-09-14 20:26:19.000000000 +0100
+++ linux-2.6.18-rc7/drivers/md/dm.c	2006-09-14 20:55:52.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:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux