send 'change' uevent for device-mapper table resume

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

 



Hi Alasdair,
I'm not sure if Hannes already sent this, if not, please take this into
your tree. As discussed at OLS, this is one step, to make udev's operation
on dm devices more reliable.

Thanks,
Kay


From: Hannes Reinecke <hare@xxxxxxx>

device-mapper: send 'change' uevent for device-mapper table resume

Device-mapper tables are only ever usable after a 'resume'
ioctl has been issued. But to know when this happens we need to
generate an uevent to notify udev, so that it can take appropriate
action.

As discussed with agk and kay at OLS we should be sending 'change' events
for resume; events on suspend don't give you anything interesting and indeed
might lead to failures as any I/O on that table will be blocked anyway.

Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
Signed-off-by: Kay Sievers <kay.sievers@xxxxxxxx>
-- 

 dm.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index c99bf9f..93014c4 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1337,6 +1337,8 @@ int dm_resume(struct mapped_device *md)
 
 	dm_table_unplug_all(map);
 
+	kobject_uevent(&md->disk->kobj, KOBJ_CHANGE);
+
 	r = 0;
 
 out:

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux