From afa91842ff01982823d891d57650a387fd69ad31 Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Tue, 5 Mar 2024 14:42:23 +0100 Subject: [PATCH] Fix getting subvolumes for mounted btrfs volumes When looking for a mountpoint we're trying to compare device name with the device node base name which doesn't work for DM devices like LUKS (we're trying to compare "dm-0" to "luks-..."), we need to make sure to resolve the name first. --- blivet/devices/btrfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blivet/devices/btrfs.py b/blivet/devices/btrfs.py index 259bcf82a..63e4cbe8b 100644 --- a/blivet/devices/btrfs.py +++ b/blivet/devices/btrfs.py @@ -357,7 +357,7 @@ def _get_any_btrfs_mountpoint(self): # now try every possible mountpoint with any subvolspec in our cache parents = [p.name for p in self.parents] - mount_spec = next(((dev, subvol) for dev, subvol in mounts_cache.mountpoints if dev in parents), None) + mount_spec = next(((dev, subvol) for dev, subvol in mounts_cache.mountpoints if udev.resolve_devspec(dev) in parents), None) if mount_spec: try: return mounts_cache.get_mountpoints(devspec=mount_spec[0],