Blame 0046-PATCH-add-support-for-xfs-reiserfs-separate-journal-.patch

Harald Hoyer 12f6cc
From 6a5170a15f67a72bcec427a252d23ead4f3ae89a Mon Sep 17 00:00:00 2001
Harald Hoyer 12f6cc
From: Frederic Crozat <fcrozat@suse.com>
Harald Hoyer 12f6cc
Date: Thu, 26 Jul 2012 15:16:22 +0200
Harald Hoyer 12f6cc
Subject: [PATCH] PATCH: add support for xfs / reiserfs separate journal
Harald Hoyer 12f6cc
 device
Harald Hoyer 12f6cc
Harald Hoyer 12f6cc
xfs and reiserfs (among other) supports storing journal data to a
Harald Hoyer 12f6cc
separate device. Unfortunately, XFS requires this information to boot
Harald Hoyer 12f6cc
properly (reiserfs can embed the information in its metadata but you
Harald Hoyer 12f6cc
might want to override it).
Harald Hoyer 12f6cc
Harald Hoyer 12f6cc
Attached patch ensure host information are stored in initramfs and also
Harald Hoyer 12f6cc
allows to give data over kernel commandline.
Harald Hoyer 12f6cc
Harald Hoyer 12f6cc
--
Harald Hoyer 12f6cc
Frederic Crozat <fcrozat@suse.com>
Harald Hoyer 12f6cc
SUSE
Harald Hoyer 12f6cc
Harald Hoyer 12f6cc
>From a7c592b9bb7de0d7874ae51d02944a7eee2ec75b Mon Sep 17 00:00:00 2001
Harald Hoyer 12f6cc
From: Frederic Crozat <fcrozat@suse.com>
Harald Hoyer 12f6cc
Date: Tue, 24 Jul 2012 18:52:17 +0200
Harald Hoyer 12f6cc
Subject: [PATCH] Add support for separate journal on reiserfs and xfs
Harald Hoyer 12f6cc
---
Harald Hoyer 12f6cc
 modules.d/95rootfs-block/mount-root.sh | 19 ++++++++++++++++++-
Harald Hoyer 12f6cc
 1 file changed, 18 insertions(+), 1 deletion(-)
Harald Hoyer 12f6cc
Harald Hoyer 12f6cc
diff --git a/modules.d/95rootfs-block/mount-root.sh b/modules.d/95rootfs-block/mount-root.sh
Harald Hoyer 12f6cc
index de9753a..a6cba12 100755
Harald Hoyer 12f6cc
--- a/modules.d/95rootfs-block/mount-root.sh
Harald Hoyer 12f6cc
+++ b/modules.d/95rootfs-block/mount-root.sh
Harald Hoyer 12f6cc
@@ -7,9 +7,26 @@ type det_fs >/dev/null 2>&1 || . /lib/fs-lib.sh
Harald Hoyer 12f6cc
 
Harald Hoyer 12f6cc
 mount_root() {
Harald Hoyer 12f6cc
     local _ret
Harald Hoyer 12f6cc
-    local _rflags_ro="$rflags,ro"
Harald Hoyer 12f6cc
+    local _rflags_ro
Harald Hoyer 12f6cc
     # sanity - determine/fix fstype
Harald Hoyer 12f6cc
     rootfs=$(det_fs "${root#block:}" "$fstype")
Harald Hoyer 12f6cc
+
Harald Hoyer 12f6cc
+    journaldev=$(getarg root.journaldev)
Harald Hoyer 12f6cc
+    if [ -n $journaldev ]; then
Harald Hoyer 12f6cc
+        case "$rootfs" in
Harald Hoyer 12f6cc
+            xfs)
Harald Hoyer 12f6cc
+                rflags="${rflags:+${rflags},}logdev=$journaldev"
Harald Hoyer 12f6cc
+                ;;
Harald Hoyer 12f6cc
+            reiserfs)
Harald Hoyer 12f6cc
+                fsckoptions="-j $journaldev $fsckoptions"
Harald Hoyer 12f6cc
+                rflags="${rflags:+${rflags},}jdev=$journaldev"
Harald Hoyer 12f6cc
+                ;;
Harald Hoyer 12f6cc
+            *);;
Harald Hoyer 12f6cc
+        esac
Harald Hoyer 12f6cc
+    fi
Harald Hoyer 12f6cc
+
Harald Hoyer 12f6cc
+    _rflags_ro="$rflags,ro"
Harald Hoyer 12f6cc
+
Harald Hoyer 12f6cc
     while ! mount -t ${rootfs} -o "$_rflags_ro" "${root#block:}" "$NEWROOT"; do
Harald Hoyer 12f6cc
         warn "Failed to mount -t ${rootfs} -o $_rflags_ro ${root#block:} $NEWROOT"
Harald Hoyer 12f6cc
         fsck_ask_err