From 88755424bf7866396e0e7556e2a6af1efb441cf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 17 Sep 2012 10:17:26 +0200 Subject: [PATCH] zipl: Flush disk buffers before installing IPL record (#857814) --- s390-tools-1.19.0-fedora.patch | 53 ++++++++++++++++++++++++++++++---- s390utils.spec | 7 +++-- 2 files changed, 53 insertions(+), 7 deletions(-) diff --git a/s390-tools-1.19.0-fedora.patch b/s390-tools-1.19.0-fedora.patch index bf37242..f790b7d 100644 --- a/s390-tools-1.19.0-fedora.patch +++ b/s390-tools-1.19.0-fedora.patch @@ -1,7 +1,7 @@ From 911c72bbf7ae362111593e82c4dfe730a44a1e8f Mon Sep 17 00:00:00 2001 From: Dan Horak Date: Sun, 20 Jul 2008 09:24:05 +0200 -Subject: [PATCH 1/5] s390-tools-1.5.3-zipl-zfcpdump-2 +Subject: [PATCH 1/6] s390-tools-1.5.3-zipl-zfcpdump-2 --- common.mak | 4 ++-- @@ -29,7 +29,7 @@ index 5321ccb..541a232 100644 From d8a4a2d505564e597cefab16871c35cfb6f06854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 23 Apr 2009 11:46:01 +0200 -Subject: [PATCH 2/5] s390-tools-1.8.1-fdasd-su +Subject: [PATCH 2/6] s390-tools-1.8.1-fdasd-su --- fdasd/fdasd.c | 10 ++++++---- @@ -63,7 +63,7 @@ index 842e72a..3ab81c0 100644 From 39ac18ef1622f4ae1254983530e120a7d036aff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 19 Jun 2009 10:01:30 +0200 -Subject: [PATCH 3/5] s390-tools-1.8.1-zipl-kdump-man +Subject: [PATCH 3/6] s390-tools-1.8.1-zipl-kdump-man Description: Add kdump kernel installation instruction to zipl man page. Symptom: User wants to prepare SCSI disk for dump, but has not installed @@ -95,7 +95,7 @@ index 01d18c5..e699b59 100644 From 0dc93d3f17430677e1e218124bef32730d4f35ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 21 Aug 2012 09:58:21 +0200 -Subject: [PATCH 4/5] Support for new storage device on System z (rhbz#847086) +Subject: [PATCH 4/6] Support for new storage device on System z (rhbz#847086) Allow Linux to access a new storage device as a block device using a new interface. That includes the adaption of common IO functions to allow to attach, configure @@ -408,7 +408,7 @@ index 0000000..25a8a2a From 93b91117cbe2c0d036bf10a8cc139bee2ba94caf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 27 Aug 2012 16:34:25 +0200 -Subject: [PATCH 5/5] lszcrypt/chzcrypt: Add support for CEX4 crypto card +Subject: [PATCH 5/6] lszcrypt/chzcrypt: Add support for CEX4 crypto card (rhbz#847092) --- @@ -792,3 +792,46 @@ index 01d4fa7..e8ca6ce 100644 -- 1.7.7.6 + +From 9cdbb967999268021ca326b405abf01d00d1f7b2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dan=20Hor=C3=A1k?= +Date: Mon, 17 Sep 2012 10:05:47 +0200 +Subject: [PATCH 6/6] zipl: Flush disk buffers before installing IPL record + (rhbz#857814) + +--- + zipl/src/install.c | 11 +++++++++++ + 1 files changed, 11 insertions(+), 0 deletions(-) + +diff --git a/zipl/src/install.c b/zipl/src/install.c +index 87d6243..ca3fc2c 100644 +--- a/zipl/src/install.c ++++ b/zipl/src/install.c +@@ -45,6 +45,9 @@ enum scsi_layout { + scsi_layout_unknown + }; + ++/* From linux/fs.h */ ++#define BLKFLSBUF _IO(0x12, 97) ++ + + /* Determine SCSI disk layout from the specified BOOTBLOCK. */ + static enum scsi_layout +@@ -275,6 +278,14 @@ install_bootloader(const char *device, disk_blockptr_t *program_table, + device); + return -1; + } ++ /* Ensure that potential cache inconsistencies between disk and ++ * partition are resolved by flushing the corresponding buffers. */ ++ if (!dry_run) { ++ if (ioctl(fd, BLKFLSBUF)) { ++ fprintf(stderr, "Warning: Could not flush disk " ++ "caches.\n"); ++ } ++ } + /* Call disk specific install functions */ + rc = -1; + switch (info->type) { +-- +1.7.7.6 + diff --git a/s390utils.spec b/s390utils.spec index 77bd351..7f899be 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -8,7 +8,7 @@ Name: s390utils Summary: Utilities and daemons for IBM System/z Group: System Environment/Base Version: 1.19.0 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 2 License: GPLv2 and GPLv2+ and CPL ExclusiveArch: s390 s390x @@ -857,8 +857,11 @@ User-space development files for the s390/s390x architecture. %changelog +* Mon Sep 16 2012 Dan Horák - 2:1.19.0-3 +- zipl: Flush disk buffers before installing IPL record (#857814) + * Mon Aug 27 2012 Dan Horák 2:1.19.0-2 -- add support fro CEX4 devices to chzcrypt/lszcrypt (#847092) +- add support for CEX4 devices to chzcrypt/lszcrypt (#847092) * Mon Aug 27 2012 Dan Horák 2:1.19.0-1 - updated to 1.19.0 (#804774)