From f8e000ca22b6bb36cd9389e229e6d3c59a321cea639b8ff9452fbd6b1bc60cf1 Mon Sep 17 00:00:00 2001 From: Andrei Borzenkov Date: Thu, 2 Mar 2017 08:02:03 +0000 Subject: [PATCH] Accepting request 461360 from home:michael-chang:branches:Base:System - Fix btrfs 1.74 regression in detection btrfs, the do_unmount has to be skipped for btrfs as it removes tmp mount point of which btrfs is making use (bsc#1024196) * modify os-prober-btrfs-absolute-subvol.patch * rediff os-prober-btrfs-always-detect-default.patch OBS-URL: https://build.opensuse.org/request/show/461360 OBS-URL: https://build.opensuse.org/package/show/Base:System/os-prober?expand=0&rev=75 --- os-prober-btrfs-absolute-subvol.patch | 23 ++++++++++++++++----- os-prober-btrfs-always-detect-default.patch | 6 +++--- os-prober.changes | 9 ++++++++ 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/os-prober-btrfs-absolute-subvol.patch b/os-prober-btrfs-absolute-subvol.patch index 3f86c4b..d534dcb 100644 --- a/os-prober-btrfs-absolute-subvol.patch +++ b/os-prober-btrfs-absolute-subvol.patch @@ -1,8 +1,8 @@ -Index: os-prober-1.61/os-probes/common/50mounted-tests +Index: os-prober/os-probes/common/50mounted-tests =================================================================== ---- os-prober-1.61.orig/os-probes/common/50mounted-tests -+++ os-prober-1.61/os-probes/common/50mounted-tests -@@ -58,9 +58,7 @@ mounted= +--- os-prober.orig/os-probes/common/50mounted-tests ++++ os-prober/os-probes/common/50mounted-tests +@@ -72,9 +72,7 @@ mounted= if [ "$types" = btrfs ]; then partition="$BTRFSDEV" @@ -13,7 +13,20 @@ Index: os-prober-1.61/os-probes/common/50mounted-tests type grub2-probe >/dev/null 2>&1 && \ grub2-mount "$partition" "$tmpmnt" 2>/dev/null; then mounted=1 -@@ -114,9 +112,9 @@ if [ "$types" = btrfs ]; then +@@ -110,7 +108,11 @@ if [ "$mounted" ]; then + fi + done + fi +-do_unmount ++ ++if [ "$types" != "btrfs" ]; then ++ do_unmount ++ exit 1 ++fi + + # all btrfs processing here. Handle both unmounted and + # mounted subvolumes. +@@ -125,9 +127,9 @@ if [ "$types" = btrfs ]; then exit 1 fi # besides regular subvols, get ro and snapshot so thet can be excluded diff --git a/os-prober-btrfs-always-detect-default.patch b/os-prober-btrfs-always-detect-default.patch index d67b327..999336d 100644 --- a/os-prober-btrfs-always-detect-default.patch +++ b/os-prober-btrfs-always-detect-default.patch @@ -20,9 +20,9 @@ Index: os-prober/os-probes/common/50mounted-tests =================================================================== --- os-prober.orig/os-probes/common/50mounted-tests +++ os-prober/os-probes/common/50mounted-tests -@@ -113,6 +113,47 @@ if [ "$mounted" ]; then +@@ -114,6 +114,47 @@ if [ "$types" != "btrfs" ]; then + exit 1 fi - do_unmount +probe_subvol () +{ @@ -68,7 +68,7 @@ Index: os-prober/os-probes/common/50mounted-tests # all btrfs processing here. Handle both unmounted and # mounted subvolumes. if [ "$types" = btrfs ]; then -@@ -135,45 +176,23 @@ if [ "$types" = btrfs ]; then +@@ -136,45 +177,23 @@ if [ "$types" = btrfs ]; then rmdir "$tmpmnt" || true exit 1 fi diff --git a/os-prober.changes b/os-prober.changes index 6197772..37b1c78 100644 --- a/os-prober.changes +++ b/os-prober.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Mar 1 04:58:40 UTC 2017 - mchang@suse.com + +- Fix btrfs 1.74 regression in detection btrfs, the do_unmount has to be + skipped for btrfs as it removes tmp mount point of which btrfs is making + use (bsc#1024196) + * modify os-prober-btrfs-absolute-subvol.patch + * rediff os-prober-btrfs-always-detect-default.patch + ------------------------------------------------------------------- Fri Feb 10 08:45:28 UTC 2017 - mchang@suse.com