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

From: Alasdair G Kergon
Date: Thu Sep 14 2006 - 17:48:20 EST


From: Hannes Reinecke <hare@xxxxxxx>

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@xxxxxxx>
Signed-off-by: Kay Sievers <kay.sievers@xxxxxxxx>
Signed-off-by: Alasdair G Kergon <agk@xxxxxxxxxx>

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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/