SHA256
1
0
forked from pool/kdump
kdump/kdump-Add-skip_balance-option-to-BTRFS-mounts.patch
Petr Tesařík 594a5a221d 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
2019-04-16 10:29:27 +00:00

37 lines
1.1 KiB
Diff

From f46c26fcf879f368726acf650c43eacde909dc9d Mon Sep 17 00:00:00 2001
From: Petr Tesarik <ptesarik@suse.com>
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 <ptesarik@suse.com>
---
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