summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Horák <dan@danny.cz>2014-03-04 12:05:39 +0100
committerDan Horák <dan@danny.cz>2014-03-04 12:05:39 +0100
commitb01d408d9f4db9235ca2610feeb40a841984fb01 (patch)
treecc315cb2df90e0603a0149a8e507c10a806ccc60
parentd92d73a2fd97ac7220d5b6b001e0b05c8c07d2f9 (diff)
downloadutils-b01d408d9f4db9235ca2610feeb40a841984fb01.tar.gz
utils-b01d408d9f4db9235ca2610feeb40a841984fb01.tar.xz
utils-b01d408d9f4db9235ca2610feeb40a841984fb01.zip
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.
-rw-r--r--device_cio_free14
1 files 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