dm: add uevent change event on resume
Alasdair G Kergon
maintainerPATCH 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
@@ -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:
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.
Signed-off-by Hannes Reinecke <[email protected]>Signed-off-by Kay Sievers <[email protected]>Signed-off-by Alasdair G Kergon <[email protected]>
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