Tomas Bzatek 10280e
From f24601b1d1302350fff15f326bfe3cfabde05f4c Mon Sep 17 00:00:00 2001
Tomas Bzatek 10280e
From: Tomas Bzatek <tbzatek@redhat.com>
Tomas Bzatek 10280e
Date: Fri, 19 May 2023 17:17:56 +0200
Tomas Bzatek 10280e
Subject: [PATCH] lvm2: Trigger uevent sync on block devices when creating new
Tomas Bzatek 10280e
 VG
Tomas Bzatek 10280e
Tomas Bzatek 10280e
This will likely slow down processing with the hope that
Tomas Bzatek 10280e
more objects have their properties updated properly.
Tomas Bzatek 10280e
---
Tomas Bzatek 10280e
 modules/lvm2/udiskslinuxmanagerlvm2.c | 3 ++-
Tomas Bzatek 10280e
 1 file changed, 2 insertions(+), 1 deletion(-)
Tomas Bzatek 10280e
Tomas Bzatek 10280e
diff --git a/modules/lvm2/udiskslinuxmanagerlvm2.c b/modules/lvm2/udiskslinuxmanagerlvm2.c
Tomas Bzatek 10280e
index b0c62fdcd6..5c06b921df 100644
Tomas Bzatek 10280e
--- a/modules/lvm2/udiskslinuxmanagerlvm2.c
Tomas Bzatek 10280e
+++ b/modules/lvm2/udiskslinuxmanagerlvm2.c
Tomas Bzatek 10280e
@@ -384,7 +384,8 @@ handle_volume_group_create (UDisksManagerLVM2     *_object,
Tomas Bzatek 10280e
       UDisksObject *object_for_block;
Tomas Bzatek 10280e
       object_for_block = udisks_daemon_util_dup_object (block, &error);
Tomas Bzatek 10280e
       if (object_for_block != NULL)
Tomas Bzatek 10280e
-        udisks_linux_block_object_trigger_uevent (UDISKS_LINUX_BLOCK_OBJECT (object_for_block));
Tomas Bzatek 10280e
+        udisks_linux_block_object_trigger_uevent_sync (UDISKS_LINUX_BLOCK_OBJECT (object_for_block),
Tomas Bzatek 10280e
+                                                       UDISKS_DEFAULT_WAIT_TIMEOUT);
Tomas Bzatek 10280e
       g_object_unref (object_for_block);
Tomas Bzatek 10280e
     }
Tomas Bzatek 10280e