Skip to contentSkip to conversation

dm: add uevent change event on resume

PATCH In review Alasdair G Kergon 2 participants 2 messages Sep 14, 2006 – Sep 15, 2006 Device mapper

lore
Share & tools
lore

Alasdair G Kergon

author maintainer
#0 lore raw

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

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.

drivers/md/dm.c +2 -0
Index: linux-2.6.18-rc7/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:
#1 lore raw
Quoted 6 lines · Alasdair G Kergon

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.

Quoted 6 lines

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

I was at that meeting for a bit (had to chase after my son...) so feel free to add:

from me to this patch.

thanks,

greg k-h