[PATCH] Find the CMSDASD device on guests with one CPU active (#736457)

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

 



If you detach all but one CPU on an s390x guest, the linuxrc.s390
cannot free the CMSDASD device and bring it online.
---
 loader/linuxrc.s390 |   23 ++++++++++++++---------
 1 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/loader/linuxrc.s390 b/loader/linuxrc.s390
index 288dc12..498c68f 100644
--- a/loader/linuxrc.s390
+++ b/loader/linuxrc.s390
@@ -50,6 +50,7 @@ elif [ "${0##*/}" = "halt" ]; then
 fi
 
 VERSION=1.2
+NUMCPUS=$(grep processors /proc/cpuinfo | cut -c19-)
 
 export TEXTDOMAIN=s390installer
 export TEXTDOMAINDIR=/usr/lib/locale
@@ -150,7 +151,7 @@ function dasd_settle() {
         return 1
     fi
     local i=1
-    while [ $i -le 30 ] ; do
+    while [ $i -le 60 ] ; do
         local status
         read status < $dasd_status
         case $status in
@@ -225,14 +226,18 @@ function readcmsfile() # $1=dasdport $2=filename
     # precondition: dasd_eckd_mod driver incl. dependencies loaded,
     #               dasd_mod must be loaded without setting any DASD online
     dev=$(canonicalize_devno $1)
-    if ! sysecho /sys/bus/ccw/devices/$dev/online 1; then
-        echo $"DASD $dev could not be set online"
-        return 1
-    fi
-    udevadm settle
-    if ! dasd_settle $dev ; then
-        echo $"Could not access DASD $dev in time"
-        return 1
+    if [ ${NUMCPUS} -eq 1 ]; then
+        echo 1 > /sys/bus/ccw/devices/$dev/online
+    else
+        if ! sysecho /sys/bus/ccw/devices/$dev/online 1; then
+            echo $"DASD $dev could not be set online"
+            return 1
+        fi
+        udevadm settle
+        if ! dasd_settle $dev ; then
+            echo $"Could not access DASD $dev in time"
+            return 1
+        fi
     fi
     udevadm settle
     if ! cmsfscat -d /dev/dasda -a $2 > /tmp/$2; then
-- 
1.7.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux