From b01d408d9f4db9235ca2610feeb40a841984fb01 Mon Sep 17 00:00:00 2001 From: Dan HorĂ¡k Date: Tue, 4 Mar 2014 12:05:39 +0100 Subject: device_cio_free: move cio_settle use into wait_on_devices Use cio_settle mechanism in both paths where wait_on_devices is used. Also issue udevadm settle to resolve timing issues when anaconda (or rather blivet) discovers new zFCP devices. --- device_cio_free | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/device_cio_free b/device_cio_free index 3367ba1..b4c3750 100644 --- a/device_cio_free +++ b/device_cio_free @@ -98,6 +98,13 @@ wait_on_single_device() # at this point we know the content of ALL_DEVICES is syntacticly correct wait_on_devices() { + if [ -w $CIO_SETTLE ]; then + [ $VERBOSE ] && echo "Waiting until all pending CIO requests are processed" + echo 1 > $CIO_SETTLE + udevadm settle + return + fi + OLD_IFS=$IFS IFS="," set $ALL_DEVICES @@ -303,9 +310,4 @@ fi [ -z "$ALL_DEVICES" ] && exit 0 -if [ -w $CIO_SETTLE ]; then - [ $VERBOSE ] && echo "Waiting until all pending CIO requests are processed" - echo 1 > $CIO_SETTLE -else - wait_on_devices -fi +wait_on_devices -- cgit