rpms/s390utils/F-12 0012-fix-multipath-device-detection-in-ziomon.patch, NONE, 1.1 0013-zipl-handle-status-during-ipl.patch, NONE, 1.1 0014-dasdview-fdasd-fix-floating-point-error-for-unformat.patch, NONE, 1.1 s390utils.spec, 1.13, 1.14

Dan Horák sharkcz at fedoraproject.org
Fri Nov 13 10:21:17 UTC 2009


Author: sharkcz

Update of /cvs/pkgs/rpms/s390utils/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv706

Modified Files:
	s390utils.spec 
Added Files:
	0012-fix-multipath-device-detection-in-ziomon.patch 
	0013-zipl-handle-status-during-ipl.patch 
	0014-dasdview-fdasd-fix-floating-point-error-for-unformat.patch 
Log Message:
* Fri Nov 13 2009 Dan Horák <dan[at]danny.cz> 2:1.8.2-5
- added multiple fixes from IBM (#533955, #537142, #537144)


0012-fix-multipath-device-detection-in-ziomon.patch:
 ziomon |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- NEW FILE 0012-fix-multipath-device-detection-in-ziomon.patch ---
>From e9c5f5e15122b143f5f202e9782773321f8cf6b9 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Dan=20Hor=C3=A1k?= <dan at danny.cz>
Date: Fri, 13 Nov 2009 10:46:57 +0100
Subject: [PATCH 12/14] fix multipath device detection in ziomon

Description: ziomon: Fix multipath device detection
Symptom:     Running ziomon with a valid multipath device like
             /dev/mapper/36005076303ffc56200000000000010cc
             fails with "ziomon: The following devices do not seem
             to exist:".
Problem:     The output from multipath -l is not appended correctly to
             the mp_arr array.
Solution:    Properly initializing mp_arr to an empty array fixes this.
---
 ziomon/ziomon |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ziomon/ziomon b/ziomon/ziomon
index 7449843..924c1dd 100755
--- a/ziomon/ziomon
+++ b/ziomon/ziomon
@@ -471,7 +471,7 @@ function clean_devices() {
 function check_for_multipath_devices() {
    local i;
    local j;
-   local mp_arr;
+   local mp_arr=();
    local line;
    local devices_basenames;
    local tmp;
-- 
1.6.3.3


0013-zipl-handle-status-during-ipl.patch:
 common.S |   66 +++++++++++++++++++++++++++++++++++++++++----------------------
 1 file changed, 43 insertions(+), 23 deletions(-)

--- NEW FILE 0013-zipl-handle-status-during-ipl.patch ---
>From 4770ba2827a5c582c6376139f1ec2d10519779e2 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Dan=20Hor=C3=A1k?= <dan at danny.cz>
Date: Fri, 13 Nov 2009 10:48:17 +0100
Subject: [PATCH 13/14] zipl - handle status during ipl

Description: zipl: handle status during ipl
Symptom:     You encounter an error during IPL with "disabled wait" message.
Problem:     During the IPL sequence the subchannel of the IPL device has
             to be enabled. If there is a status pending or busy condition
             on the subchannel the IPL code abborts the IPL and goes into
             disabled wait.
Solution:    To resolve the problem the IPL code accepts the status pending
             or busy condition on the subchannel and does up to 256 retries.
---
 zipl/boot/common.S |   65 ++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 43 insertions(+), 22 deletions(-)

diff --git a/zipl/boot/common.S b/zipl/boot/common.S
index 620fed9..fa45e5a 100644
--- a/zipl/boot/common.S
+++ b/zipl/boot/common.S
@@ -6,6 +6,7 @@
 #
 
 # some definitions from kernel land
+__LC_IRB = 0x0300
 __LC_IPLDEV  = 0xC6C
 __LC_PANIC_MAGIC= 0xE00
 
@@ -186,23 +187,33 @@ _load_blocklist:
 _enable_device:
         stm    %r6,%r15,24(%r15)
         basr   %r13,0                   # base register
-0:      s      %r15,1f-0b(%r13)
+0:      s      %r15,4f-0b(%r13)
 	lr     %r1,%r2
-	l      %r2,4f-0b(%r13)          # set panik code early
-        stsch  2f-0b(%r13)
-        oi     2f-0b+5(%r13),0x84       # enable ssch and multipath mode
-        msch   2f-0b(%r13)
-	bnz    _panik-0b(%r13)          # subchannel busy or in error ?
-	lctl   %c6,%c6,3f-0b(%r13)      # enable all interrupt classes
+	l      %r2,7f-0b(%r13)          # set panik code early
+        stsch  5f-0b(%r13)
+	brc    1,3f		        # panic if not operational
+        oi     5f-0b+5(%r13),0x80       # enable subchannel
+	lhi    %r6,256			# r6 retry counter
+1: # modify subchannel
+        msch   5f-0b(%r13)
+	brc    6,2f        		# status pending or busy
+	brc    1,3f		        # panic if not operational
+	lctl   %c6,%c6,6f-0b(%r13)      # enable all interrupt classes
 	sr     %r2,%r2
-	ic     %r2,10+2f-0b(%r13)	# return lpum in r2
+	ic     %r2,10+5f-0b(%r13)	# return lpum in r2
         lm     %r6,%r15,120(%r15)
         br     %r14
-1:	.long  96
+2: # clear status and retry
+	tsch   __LC_IRB
+	brc    1,3f		        # panic if not operational
+	brct   %r6,1b			# retry
+3: # panic
+	b      _panik-0b(%r13)          # panic
+4:	.long  96
 	.align 8
-2:	.fill  64,1,0
-3:	.long  0xff000000               # CR6 initial value
-4:      .long  EENABLE_DEV
+5:	.fill  64,1,0
+6:	.long  0xff000000               # CR6 initial value
+7:      .long  EENABLE_DEV
 
 #
 # Disable I/O on the ipl device.
@@ -211,20 +222,30 @@ _enable_device:
 _disable_device:
         stm    %r6,%r15,24(%r15)
         basr   %r13,0                   # base register
-0:      s      %r15,1f-0b(%r13)
+0:      s      %r15,4f-0b(%r13)
 	lr     %r1,%r2
-	l      %r2,3f-0b(%r13)          # set panik code early
-	lctl   %c6,%c6,2f-0b(%r13)      # disable all interrupt classes
-        stsch  2f-0b(%r13)
-        ni     2f-0b+5(%r13),0x7B       # disable ssch and multipath mode
-        msch   2f-0b(%r13)
-	bnz    _panik-0b(%r13)          # subchannel busy or in error ?
+	l      %r2,6f-0b(%r13)          # set panik code early
+	lctl   %c6,%c6,5f-0b(%r13)      # disable all interrupt classes
+        stsch  5f-0b(%r13)
+	brc    1,3f			# panic if not operational
+        ni     5f-0b+5(%r13),0x7F       # disable subchannel
+	lhi    %r6,256			# r6 retry counter
+1: # modify subchannel
+        msch   5f-0b(%r13)
+	brc    6,2f			# status pending or busy
+	brc    1,3f			# panic if not operational
         lm     %r6,%r15,120(%r15)
         br     %r14
-1:	.long  96
+2: # clear status and retry
+	tsch   __LC_IRB
+	brc    1,3f			# panic if not operational
+	brct   %r6,1b
+3: # panic
+	b      _panik-0b(%r13)          # panic
+4:	.long  96
         .align 8
-2:	.long  0x00000000               # CR6 (all interrupts classes disabled)
-3:      .long  EDISABLE_DEV
+5:	.long  0x00000000               # CR6 (all interrupts classes disabled)
+6:      .long  EDISABLE_DEV
 	.endm	
 
 	.macro io_subroutines
-- 
1.6.3.3


0014-dasdview-fdasd-fix-floating-point-error-for-unformat.patch:
 dasdview/dasdview.c |   22 +++++++--------
 dasdview/dasdview.h |   74 +++++++++++++++++++++++++++++++++++++++++++++++++++
 fdasd/fdasd.c       |   18 ++++++------
 fdasd/fdasd.h       |   75 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 4 files changed, 168 insertions(+), 21 deletions(-)

--- NEW FILE 0014-dasdview-fdasd-fix-floating-point-error-for-unformat.patch ---
>From 72168f2269dac94d25112e0ad548bd3fcdf907d9 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Dan=20Hor=C3=A1k?= <dan at danny.cz>
Date: Fri, 13 Nov 2009 10:49:37 +0100
Subject: [PATCH 14/14] dasdview, fdasd: fix floating point error for unformatted devices

When executed on an unformatted device the tools dasdview and fdasd
will end with an floating point exception error.
The reason for the error lies in the fact that we cannot rely on the
HDIO_GETGEO ioctl to report a correct number of cylinders and so we
compute the number of cylinders from the device size. However,
for unformatted devices the device size is zero and thus our
computation ends with a floating point exception.
To solve this issue read the correct number of cylinders from
the DASD device characteristics, which can be found in the data
returned by the BIODASDINFO ioctl.
---
 dasdview/dasdview.c |   22 +++++++-------
 dasdview/dasdview.h |   74 +++++++++++++++++++++++++++++++++++++++++++++++++++
 fdasd/fdasd.c       |   18 ++++++------
 fdasd/fdasd.h       |   74 +++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 168 insertions(+), 20 deletions(-)

diff --git a/dasdview/dasdview.c b/dasdview/dasdview.c
index a74ae33..2909b16 100644
--- a/dasdview/dasdview.c
+++ b/dasdview/dasdview.c
@@ -169,7 +169,7 @@ static void
 dasdview_get_info(dasdview_info_t *info)
 {
 	int fd;
-	u_int64_t device_size;
+	struct dasd_eckd_characteristics *characteristics;
 
 	fd = open(info->device, O_RDONLY);
 	if (fd == -1)
@@ -201,16 +201,6 @@ dasdview_get_info(dasdview_info_t *info)
 		exit(-1);
 	}
 
-	if (ioctl(fd, BLKGETSIZE64, &device_size) != 0) {
-		close(fd);
-		zt_error_print("dasdview: ioctl error\n" \
-			"Could not retrieve device size information.\n");
-		exit(-1);
-	}
-
-	info->hw_cylinders = ((device_size / info->blksize)
-			      / info->geo.sectors) / info->geo.heads;
-
 	/* get disk information */
 	if (ioctl(fd, BIODASDINFO2, &info->dasd_info) == 0) {
 		info->dasd_info_version = 2;
@@ -223,6 +213,16 @@ dasdview_get_info(dasdview_info_t *info)
 			exit(-1);
 		}
 	}
+
+	characteristics = (struct dasd_eckd_characteristics *)
+		&info->dasd_info.characteristics;
+	if (characteristics->no_cyl == LV_COMPAT_CYL &&
+	    characteristics->long_no_cyl)
+		info->hw_cylinders = characteristics->long_no_cyl;
+	else
+		info->hw_cylinders = characteristics->no_cyl;
+
+
 	close(fd);
 }
 
diff --git a/dasdview/dasdview.h b/dasdview/dasdview.h
index 39e1228..5388592 100644
--- a/dasdview/dasdview.h
+++ b/dasdview/dasdview.h
@@ -72,6 +72,80 @@ typedef struct dasd_information2_t {
         unsigned int reserved7;       /* reserved for further use ,...          */
 } dasd_information2_t;
 
+struct dasd_eckd_characteristics {
+	unsigned short cu_type;
+	struct {
+		unsigned char support:2;
+		unsigned char async:1;
+		unsigned char reserved:1;
+		unsigned char cache_info:1;
+		unsigned char model:3;
+	} __attribute__ ((packed)) cu_model;
+	unsigned short dev_type;
+	unsigned char dev_model;
+	struct {
+		unsigned char mult_burst:1;
+		unsigned char RT_in_LR:1;
+		unsigned char reserved1:1;
+		unsigned char RD_IN_LR:1;
+		unsigned char reserved2:4;
+		unsigned char reserved3:8;
+		unsigned char defect_wr:1;
+		unsigned char XRC_supported:1;
+		unsigned char reserved4:1;
+		unsigned char striping:1;
+		unsigned char reserved5:4;
+		unsigned char cfw:1;
+		unsigned char reserved6:2;
+		unsigned char cache:1;
+		unsigned char dual_copy:1;
+		unsigned char dfw:1;
+		unsigned char reset_alleg:1;
+		unsigned char sense_down:1;
+	} __attribute__ ((packed)) facilities;
+	unsigned char dev_class;
+	unsigned char unit_type;
+	unsigned short no_cyl;
+	unsigned short trk_per_cyl;
+	unsigned char sec_per_trk;
+	unsigned char byte_per_track[3];
+	unsigned short home_bytes;
+	unsigned char formula;
+	union {
+		struct {
+			unsigned char f1;
+			unsigned short f2;
+			unsigned short f3;
+		} __attribute__ ((packed)) f_0x01;
+		struct {
+			unsigned char f1;
+			unsigned char f2;
+			unsigned char f3;
+			unsigned char f4;
+			unsigned char f5;
+		} __attribute__ ((packed)) f_0x02;
+	} __attribute__ ((packed)) factors;
+	unsigned short first_alt_trk;
+	unsigned short no_alt_trk;
+	unsigned short first_dia_trk;
+	unsigned short no_dia_trk;
+	unsigned short first_sup_trk;
+	unsigned short no_sup_trk;
+	unsigned char MDR_ID;
+	unsigned char OBR_ID;
+	unsigned char director;
+	unsigned char rd_trk_set;
+	unsigned short max_rec_zero;
+	unsigned char reserved1;
+	unsigned char RWANY_in_LR;
+	unsigned char factor6;
+	unsigned char factor7;
+	unsigned char factor8;
+	unsigned char reserved2[3];
+	unsigned char reserved3[6];
+	unsigned int long_no_cyl;
+} __attribute__ ((packed));
+
 /*
  * values to be used for dasd_information2_t.format
  * 0x00: NOT formatted
diff --git a/fdasd/fdasd.c b/fdasd/fdasd.c
index a526d7f..8f7f5aa 100644
--- a/fdasd/fdasd.c
+++ b/fdasd/fdasd.c
@@ -2002,7 +2002,7 @@ fdasd_get_geometry (fdasd_anchor_t *anc)
         int fd, blksize = 0;
 	dasd_information_t dasd_info;
 	char err_str[ERROR_STRING_SIZE];
-	u_int64_t device_size;
+	struct dasd_eckd_characteristics *characteristics;
 
 	if ((fd = open(options.device,O_RDONLY)) < 0) {
 		snprintf(err_str, ERROR_STRING_SIZE,
@@ -2023,14 +2023,6 @@ fdasd_get_geometry (fdasd_anchor_t *anc)
 			    "Could not retrieve blocksize information.");
 	}
 
-	if (ioctl(fd, BLKGETSIZE64, &device_size) != 0) {
-		close(fd);
-		fdasd_error(anc, unable_to_ioctl,
-			    "Could not retrieve device size information.");
-	}
-
-	anc->hw_cylinders = ((device_size / blksize) / geo.sectors) / geo.heads;
-
 	/* get disk type */
 	if (ioctl(fd, BIODASDINFO, &dasd_info) != 0) {
 	        close(fd);
@@ -2038,6 +2030,14 @@ fdasd_get_geometry (fdasd_anchor_t *anc)
 			    "Could not retrieve disk information.");
 	}
 
+	characteristics =
+		(struct dasd_eckd_characteristics *) &dasd_info.characteristics;
+	if (characteristics->no_cyl == LV_COMPAT_CYL &&
+	    characteristics->long_no_cyl)
+		anc->hw_cylinders = characteristics->long_no_cyl;
+	else
+		anc->hw_cylinders = characteristics->no_cyl;
+
 	close(fd);
 
 	if (strncmp(dasd_info.type, "ECKD", 4) != 0) {
diff --git a/fdasd/fdasd.h b/fdasd/fdasd.h
index 107e486..8a1bfd0 100644
--- a/fdasd/fdasd.h
+++ b/fdasd/fdasd.h
@@ -43,6 +43,80 @@ typedef struct dasd_information_t {
         char configuration_data[256]; /* from read_configuration_data        */
 } dasd_information_t;
 
+struct dasd_eckd_characteristics {
+	unsigned short cu_type;
+	struct {
+		unsigned char support:2;
+		unsigned char async:1;
+		unsigned char reserved:1;
+		unsigned char cache_info:1;
+		unsigned char model:3;
+	} __attribute__ ((packed)) cu_model;
+	unsigned short dev_type;
+	unsigned char dev_model;
+	struct {
+		unsigned char mult_burst:1;
+		unsigned char RT_in_LR:1;
+		unsigned char reserved1:1;
+		unsigned char RD_IN_LR:1;
+		unsigned char reserved2:4;
+		unsigned char reserved3:8;
+		unsigned char defect_wr:1;
+		unsigned char XRC_supported:1;
+		unsigned char reserved4:1;
+		unsigned char striping:1;
+		unsigned char reserved5:4;
+		unsigned char cfw:1;
+		unsigned char reserved6:2;
+		unsigned char cache:1;
+		unsigned char dual_copy:1;
+		unsigned char dfw:1;
+		unsigned char reset_alleg:1;
+		unsigned char sense_down:1;
+	} __attribute__ ((packed)) facilities;
+	unsigned char dev_class;
+	unsigned char unit_type;
+	unsigned short no_cyl;
+	unsigned short trk_per_cyl;
+	unsigned char sec_per_trk;
+	unsigned char byte_per_track[3];
+	unsigned short home_bytes;
+	unsigned char formula;
+	union {
+		struct {
+			unsigned char f1;
+			unsigned short f2;
+			unsigned short f3;
+		} __attribute__ ((packed)) f_0x01;
+		struct {
+			unsigned char f1;
+			unsigned char f2;
+			unsigned char f3;
+			unsigned char f4;
+			unsigned char f5;
+		} __attribute__ ((packed)) f_0x02;
+	} __attribute__ ((packed)) factors;
+	unsigned short first_alt_trk;
+	unsigned short no_alt_trk;
+	unsigned short first_dia_trk;
+	unsigned short no_dia_trk;
+	unsigned short first_sup_trk;
+	unsigned short no_sup_trk;
+	unsigned char MDR_ID;
+	unsigned char OBR_ID;
+	unsigned char director;
+	unsigned char rd_trk_set;
+	unsigned short max_rec_zero;
+	unsigned char reserved1;
+	unsigned char RWANY_in_LR;
+	unsigned char factor6;
+	unsigned char factor7;
+	unsigned char factor8;
+	unsigned char reserved2[3];
+	unsigned char reserved3[6];
+	unsigned int long_no_cyl;
+} __attribute__ ((packed));
+
 /* Get information on a dasd device (enhanced) */
 #define BIODASDINFO   _IOR(DASD_IOCTL_LETTER,1,dasd_information_t)
 
-- 
1.6.3.3



Index: s390utils.spec
===================================================================
RCS file: /cvs/pkgs/rpms/s390utils/F-12/s390utils.spec,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -p -r1.13 -r1.14
--- s390utils.spec	12 Nov 2009 14:42:15 -0000	1.13
+++ s390utils.spec	13 Nov 2009 10:21:17 -0000	1.14
@@ -8,7 +8,7 @@ Name:           s390utils
 Summary:        Utilities and daemons for IBM System/z
 Group:          System Environment/Base
 Version:        1.8.2
-Release:        4%{?dist}
+Release:        5%{?dist}
 Epoch:          2
 License:        GPLv2 and GPLv2+ and CPL
 Buildroot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -43,6 +43,9 @@ Patch8:   0008-fix-string-overflow-in-vt
 Patch9:   0009-change-default-load-address-for-ramdisk.patch
 Patch10:  0010-improve-mon_statd-init-script.patch
 Patch11:  0011-update-readahead-value-for-better-performance.patch
+Patch12:  0012-fix-multipath-device-detection-in-ziomon.patch
+Patch13:  0013-zipl-handle-status-during-ipl.patch
+Patch14:  0014-dasdview-fdasd-fix-floating-point-error-for-unformat.patch
 
 Patch100:       cmsfs-1.1.8-warnings.patch
 Patch101:       cmsfs-1.1.8-kernel26.patch
@@ -105,6 +108,15 @@ be used together with the zSeries (s390)
 # Update readahead value for better performance
 %patch11 -p1 -b .readahead
 
+# Fix multipath device detection in ziomon (#533955)
+%patch12 -p1 -b .ziomon-multipath
+
+# Handle status during ipl in zipl (#537142)
+%patch13 -p1 -b .zipl-status
+
+# Fix floating point error for unformatted devices in fdasd and dasdview (#537144)
+%patch14 -p1 -b .dasd-zero-division
+
 #
 # cmsfs
 #
@@ -786,6 +798,9 @@ User-space development files for the s39
 
 
 %changelog
+* Fri Nov 13 2009 Dan Horák <dan[at]danny.cz> 2:1.8.2-5
+- added multiple fixes from IBM (#533955, #537142, #537144)
+
 * Thu Nov 12 2009 Dan Horák <dan[at]danny.cz> 2:1.8.2-4
 - added udev rules and script for dasd initialization (#536966)
 - added ghosted zfcp and dasd config files, fixes their ownership on the system




More information about the scm-commits mailing list