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

[lvm-devel] [PATCH 13/14] Reorder read_ahead check



Wait for udev for debug print - otherwise read_ahead check tries
to access device not yet available through udev.

Signed-off-by: Zdenek Kabelac <zkabelac redhat com>
---
 tools/dmsetup.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/tools/dmsetup.c b/tools/dmsetup.c
index 10b9e0b..2af9c28 100644
--- a/tools/dmsetup.c
+++ b/tools/dmsetup.c
@@ -633,9 +633,16 @@ static int _create(int argc, char **argv, void *data __attribute__((unused)))
 
 	r = 1;
 
+	if (!_udev_cookie)
+		(void) dm_udev_wait(cookie);
+
 	if (_switches[VERBOSE_ARG])
 		r = _display_info(dmt);
 
+	dm_task_destroy(dmt);
+
+	return r;
+
       out:
 	if (!_udev_cookie)
 		(void) dm_udev_wait(cookie);
-- 
1.7.2


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