From 594a5a221d548c166d8fb103a9cef37f7115f36f1fa2199eada386673b9ff67c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Tesa=C5=99=C3=ADk?= Date: Tue, 16 Apr 2019 10:29:27 +0000 Subject: [PATCH] Accepting request 694773 from home:ptesarik:branches:Kernel:kdump - kdump-Add-skip_balance-option-to-BTRFS-mounts.patch: Add skip_balance option to BTRFS mounts (bsc#1108255). OBS-URL: https://build.opensuse.org/request/show/694773 OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kdump?expand=0&rev=180 --- ...-skip_balance-option-to-BTRFS-mounts.patch | 36 +++++++++++++++++++ kdump.changes | 6 ++++ kdump.spec | 4 ++- 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 kdump-Add-skip_balance-option-to-BTRFS-mounts.patch diff --git a/kdump-Add-skip_balance-option-to-BTRFS-mounts.patch b/kdump-Add-skip_balance-option-to-BTRFS-mounts.patch new file mode 100644 index 0000000..2c559ab --- /dev/null +++ b/kdump-Add-skip_balance-option-to-BTRFS-mounts.patch @@ -0,0 +1,36 @@ +From f46c26fcf879f368726acf650c43eacde909dc9d Mon Sep 17 00:00:00 2001 +From: Petr Tesarik +Date: Tue, 16 Apr 2019 11:05:18 +0200 +Subject: Add skip_balance option to BTRFS mounts +References: bsc#1108255 +Upstream: merged +Git-commit: f46c26fcf879f368726acf650c43eacde909dc9d + +If a crash happens while a balance operation is being performed on a +target btrfs filesystem, then this balance operation is resumed in +the kdump environment, which is not desirable. Skip it by adding a +'skip_balance' mount option to the kdump initrd. + +Signed-off-by: Petr Tesarik +--- + init/setup-kdump.functions | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/init/setup-kdump.functions b/init/setup-kdump.functions +index 46b2902..9ff5efc 100644 +--- a/init/setup-kdump.functions ++++ b/init/setup-kdump.functions +@@ -764,6 +764,10 @@ function kdump_update_mount() # {{{ + mountpoint="/kdump/mnt$i/${mountpoint#/kdump/mnt*/}" + done + ++ if [ "$fstype" = "btrfs" ] ; then ++ opts="$opts,skip_balance" ++ fi ++ + kdump_mnt[i]="${mountpoint%/}" + kdump_dev[i]="$device" + kdump_fstype[i]="$fstype" +-- +2.16.4 + diff --git a/kdump.changes b/kdump.changes index bfb14b2..2a21b3d 100644 --- a/kdump.changes +++ b/kdump.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Apr 16 09:12:51 UTC 2019 - ptesarik@suse.com + +- kdump-Add-skip_balance-option-to-BTRFS-mounts.patch: Add + skip_balance option to BTRFS mounts (bsc#1108255). + ------------------------------------------------------------------- Wed Mar 20 15:35:29 UTC 2019 - ptesarik@suse.com diff --git a/kdump.spec b/kdump.spec index 959039c..1487646 100644 --- a/kdump.spec +++ b/kdump.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -60,6 +60,7 @@ Patch11: %{name}-Restore-only-static-routes-in-kdump-initrd.patch Patch12: %{name}-fallback-re-register-fadump-from-userspace.patch Patch13: %{name}-recover-from-missing-CRASHTIME.patch Patch14: %{name}-fix-multipath-user_friendly_names.patch +Patch15: %{name}-Add-skip_balance-option-to-BTRFS-mounts.patch BuildRequires: asciidoc BuildRequires: cmake BuildRequires: gcc-c++ @@ -131,6 +132,7 @@ after a crash dump has occured. %patch12 -p1 %patch13 -p1 %patch14 -p1 +%patch15 -p1 %build export CFLAGS="%{optflags}"