From: David Zeuthen Date: Mon, 3 Oct 2011 20:56:02 +0000 (-0400) Subject: Ignore uevent if so requested by device-mapper X-Git-Tag: upstream/2.1.2~463 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=24d7566ba7c8c506253337df69ec3c057b9a010d;p=platform%2Fupstream%2Fudisks2.git Ignore uevent if so requested by device-mapper Signed-off-by: David Zeuthen --- diff --git a/src/udiskslinuxprovider.c b/src/udiskslinuxprovider.c index 629d50b..b882959 100644 --- a/src/udiskslinuxprovider.c +++ b/src/udiskslinuxprovider.c @@ -445,8 +445,22 @@ handle_block_uevent (UDisksLinuxProvider *provider, } else { - handle_block_uevent_for_drive (provider, action, device); - handle_block_uevent_for_block (provider, action, device); + if (g_udev_device_get_property_as_boolean (device, "DM_UDEV_DISABLE_OTHER_RULES_FLAG")) + { + /* Ignore the uevent if the device-mapper layer requests + * that other rules ignore this uevent + * + * It's somewhat nasty to do this but it avoids all kinds of + * race-conditions caused by the design of device-mapper + * (such as temporary-cryptsetup nodes and cleartext devices + * without ID_FS properties properly set). + */ + } + else + { + handle_block_uevent_for_drive (provider, action, device); + handle_block_uevent_for_block (provider, action, device); + } } if (g_strcmp0 (action, "add") != 0)