python-blivet/0001-Make-sure-we-mount-the-top-level-subvolume-when-moun.patch

37 lines
1.3 KiB
Diff
Raw Normal View History

From 0b672ff4527ccbb7b7527f1ab2394fa36738b27f Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Thu, 27 Jan 2022 17:53:06 +0100
Subject: [PATCH 1/1] Make sure we mount the top level subvolume when mounting
btrfs
If we don't specify the subvolid=5 we end up mounting the default
subvolume and if it isn't the top volume one, we can't remove
other subvolumes "higher" in the hierarchy.
This makes the installer crash when reinstalling over a preexisting
btrfs installation, for example the default openSUSE installation
where the default subvolume is a post installation snapshot.
Resolves: rhbz#2026205
---
blivet/devices/btrfs.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/blivet/devices/btrfs.py b/blivet/devices/btrfs.py
index 3b9374fc..6629ba95 100644
--- a/blivet/devices/btrfs.py
+++ b/blivet/devices/btrfs.py
@@ -123,7 +123,8 @@ class BTRFSDevice(StorageDevice):
else:
tmpdir = tempfile.mkdtemp(prefix=self._temp_dir_prefix)
try:
- util.mount(device=fmt.device, mountpoint=tmpdir, fstype=fmt.type)
+ util.mount(device=fmt.device, mountpoint=tmpdir, fstype=fmt.type,
+ options=fmt.mountopts)
except errors.FSError as e:
log.debug("btrfs temp mount failed: %s", e)
raise
--
2.33.0