[PATCH 1/2] Use /sbin/dasd_cio_free to free blacklisted DASDs (#558881)

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

 



Use the dasd_cio_free command to free blacklisted DASDs and block until
they are available to set online and set other attributes.  We were just
writing "free $DEVICE" to /proc/cio_ignore, but we lacked the wait loop
to make sure the device showed up.  The /sbin/dasd_cio_free command does
that for us, so we can just call that.

NOTE:  dasd_cio_free as currently written only reads a device list from
/etc/dasd.conf.  It does not take command line options.  For beta 2,
there is slated an update to s390utils to allow the *_cio_free commands
to take in a command line argument specifying the device to tree.  Until
that happens, we have to pass that information to dasd_cio_free via the
/etc/dasd.conf file.
---
 loader/linuxrc.s390  |    8 +++++---
 scripts/upd-instroot |    1 +
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/loader/linuxrc.s390 b/loader/linuxrc.s390
index e2ba469..454b02b 100644
--- a/loader/linuxrc.s390
+++ b/loader/linuxrc.s390
@@ -2397,6 +2397,7 @@ function parse_dasd() {
     [ "$1" = "-h" ] && handle=yes || unset handle
     local dasditem
     local allgood="yes"
+    local dasdconf="/etc/dasd.conf"
     while read dasditem; do
         unset range features range lo hi rangegood \
             attrs devno lodevno hidevno devbusid sys
@@ -2466,12 +2467,12 @@ function parse_dasd() {
                     esac
                 fi
                 if [ "$rangegood" = "yes" -a "$handle" = "yes" ]; then
-                    if ! sysecho /proc/cio_ignore "free $range"; then
+                    echo "$range" > $dasdconf
+                    if ! dasd_cio_free; then
                         echo $"Could not free DASD device $range from device blacklist"
                         allgood="no"
-                    else
-                        udevadm settle
                     fi
+                    rm -f $dasdconf
                 fi
                 if [ "${features//*)/}" != "" ]; then
                     if [ -z "$handle" ]; then
@@ -2527,6 +2528,7 @@ function parse_dasd() {
                 ;;
         esac
     done < <(echo $DASD | sed 's/,/\n/g')
+    rm -f $dasdconf
     if [ "$handle" = "yes" ]; then
         udevadm settle
         dasd_settle_all || return 1
diff --git a/scripts/upd-instroot b/scripts/upd-instroot
index 8250ea1..ca0fcce 100755
--- a/scripts/upd-instroot
+++ b/scripts/upd-instroot
@@ -709,6 +709,7 @@ bin/uname
 bin/vi
 lib/modules/ibm
 lib/security
+sbin/*_cio_free
 sbin/arp
 sbin/cmsfscat
 sbin/cmsfslst
-- 
1.6.6.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