From 0a89c2307e28491cbbd593ca2fd6b39e2d77079e Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 3 Aug 2010 13:04:32 +0000 Subject: [PATCH] Wait for node creation before displaying debug info in dmsetup. Readahead check needs to see created node - so wait till udev gets in sync. --- WHATS_NEW_DM | 1 + tools/dmsetup.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index 980899ef5..4104eae2d 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,5 +1,6 @@ Version 1.02.54 - ================================ + Wait for node creation before displaying debug info in dmsetup. Fix return status 0 for "dmsetup info -c -o help". Add check for kernel semaphore support and disable udev_sync if not available. diff --git a/tools/dmsetup.c b/tools/dmsetup.c index cca7424b1..885566709 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);