Blame 0045-usrmount-Fix-miss-detection-of-btrfs-subvolumes.patch

Harald Hoyer 75f812
From d57b8833c43d297004d8393d8e54a2ab2655a899 Mon Sep 17 00:00:00 2001
Harald Hoyer 75f812
From: Colin Guthrie <colin@mageia.org>
Harald Hoyer 75f812
Date: Fri, 3 May 2013 17:16:05 +0100
Harald Hoyer 75f812
Subject: [PATCH] usrmount: Fix miss-detection of btrfs subvolumes.
Harald Hoyer 75f812
Harald Hoyer 75f812
This causes the root FS options to be incorrectly applied to to /usr
Harald Hoyer 75f812
In some cases this can cause boot failure e.g. due to and XFS /usr
Harald Hoyer 75f812
not supporting the 'acl' option from the ext4 root FS.
Harald Hoyer 75f812
Harald Hoyer 75f812
https://bugs.mageia.org/show_bug.cgi?id=9884
Harald Hoyer 75f812
---
Harald Hoyer 75f812
 modules.d/98usrmount/mount-usr.sh | 4 ++--
Harald Hoyer 75f812
 1 file changed, 2 insertions(+), 2 deletions(-)
Harald Hoyer 75f812
Harald Hoyer 75f812
diff --git a/modules.d/98usrmount/mount-usr.sh b/modules.d/98usrmount/mount-usr.sh
Harald Hoyer 75f812
index a4a66ae..de7dcc2 100755
Harald Hoyer 75f812
--- a/modules.d/98usrmount/mount-usr.sh
Harald Hoyer 75f812
+++ b/modules.d/98usrmount/mount-usr.sh
Harald Hoyer 75f812
@@ -61,14 +61,14 @@ mount_usr()
Harald Hoyer 75f812
                 LABEL=*)
Harald Hoyer 75f812
                     _dev="$(echo $_dev | sed 's,/,\\x2f,g')"
Harald Hoyer 75f812
                     _dev="/dev/disk/by-label/${_dev#LABEL=}"
Harald Hoyer 75f812
-		    ;;
Harald Hoyer 75f812
+                    ;;
Harald Hoyer 75f812
                 UUID=*)
Harald Hoyer 75f812
                     _dev="${_dev#block:}"
Harald Hoyer 75f812
                     _dev="/dev/disk/by-uuid/${_dev#UUID=}"
Harald Hoyer 75f812
                     ;;
Harald Hoyer 75f812
             esac
Harald Hoyer 75f812
             if strstr "$_opts" "subvol=" && \
Harald Hoyer 75f812
-                [ "${root#block:}" -ef $_dev ]
Harald Hoyer 75f812
+                [ "${root#block:}" -ef $_dev ] && \
Harald Hoyer 75f812
                 [ -n "$rflags" ]; then
Harald Hoyer 75f812
                 # for btrfs subvolumes we have to mount /usr with the same rflags
Harald Hoyer 75f812
                 rflags=$(filtersubvol "$rflags")