Blame SOURCES/0042-ppc64le-sync-grub.cfg-changes-to-disk-1212114.patch

903092
From 8f0ef3e08aaef134ec4acfe87a6628b3fda2243c Mon Sep 17 00:00:00 2001
903092
From: Don Zickus <dzickus@redhat.com>
903092
Date: Wed, 22 Jul 2015 13:58:53 -0400
903092
Subject: [PATCH] ppc64le sync grub.cfg changes to disk (#1212114)
903092
903092
After installing a new kernel, if a panic is induced, not all the kernel
903092
pieces are on the disk (most importantly the grub.cfg changes).  This can
903092
lead to a hung system on a reboot because the older kernel can not be found.
903092
903092
Address this by forcing all the changes (mainly the fs meta data) to disk
903092
before finishing the kernel package installation.
903092
903092
Tested by 'yum install kernel-...; echo c > /proc/sysrq-trigger'.
903092
903092
Before, the machine would panic and on reboot be stuck without a grub.cfg
903092
to read.  After, works as expected.
903092
903092
Related: rhbz#1212114
903092
---
903092
 new-kernel-pkg | 8 ++++++++
903092
 1 file changed, 8 insertions(+)
903092
903092
diff --git a/new-kernel-pkg b/new-kernel-pkg
903092
index 1f6ab39..90652da 100755
903092
--- a/new-kernel-pkg
903092
+++ b/new-kernel-pkg
903092
@@ -927,4 +927,12 @@ fi
903092
 # if we mounted the U-Boot directory, unmount it.
903092
 [ -n "$mounted" ] && umount $ubootDir
903092
 
903092
+# make sure changes make it to the disk.
903092
+# if /boot is a mountpoint, force the meta data on disk
903092
+# to by-pass writeback delay.
903092
+# PPC64LE-only to deal with Petitboot issues
903092
+if [ "$ARCH" = "ppc64le" ]; then
903092
+    sync && mountpoint -q /boot &&fsfreeze -f /boot && fsfreeze -u /boot
903092
+fi
903092
+
903092
 exit 0
903092
-- 
903092
1.8.3.1
903092