diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-01-10 18:21:11 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-01-10 18:21:11 +0000 |
commit | 1fe49f5b3e13481832866b6b1600741bf3a1f024 (patch) | |
tree | 798fe4fb7ef373a92cfafe1a9c5a7954181c7213 /app-containers/lxd/files | |
parent | 79e2fe7ce5d8192f7ddc9f57d4fb11bd1231f041 (diff) |
gentoo auto-resync : 10:01:2023 - 18:21:10
Diffstat (limited to 'app-containers/lxd/files')
-rw-r--r-- | app-containers/lxd/files/lxd-5.0.2-fix-btrfs-driver-to-support-btrfs-6.0.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/app-containers/lxd/files/lxd-5.0.2-fix-btrfs-driver-to-support-btrfs-6.0.patch b/app-containers/lxd/files/lxd-5.0.2-fix-btrfs-driver-to-support-btrfs-6.0.patch new file mode 100644 index 000000000000..c6cf6c97b013 --- /dev/null +++ b/app-containers/lxd/files/lxd-5.0.2-fix-btrfs-driver-to-support-btrfs-6.0.patch @@ -0,0 +1,27 @@ +From 37779fd75dbcd02fab03a8327a1ec7a6f3273371 Mon Sep 17 00:00:00 2001 +From: Thomas Parrott <thomas.parrott@canonical.com> +Date: Wed, 4 Jan 2023 09:59:37 +0000 +Subject: [PATCH] lxd/storage/drivers/driver/btrfs/utils: Fix getQGroup to + suport BTRFS >= 6.0.1 + +Fixes #11210 + +Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com> +--- + lxd/storage/drivers/driver_btrfs_utils.go | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/lxd/storage/drivers/driver_btrfs_utils.go b/lxd/storage/drivers/driver_btrfs_utils.go +index 8f0846d2fc9f..e1468e4b1a59 100644 +--- a/lxd/storage/drivers/driver_btrfs_utils.go ++++ b/lxd/storage/drivers/driver_btrfs_utils.go +@@ -247,7 +247,8 @@ func (d *btrfs) getQGroup(path string) (string, int64, error) { + var qgroup string + usage := int64(-1) + for _, line := range strings.Split(output, "\n") { +- if line == "" || strings.HasPrefix(line, "qgroupid") || strings.HasPrefix(line, "---") { ++ // Use case-insensitive field title match because BTRFS tooling changed casing between versions. ++ if line == "" || strings.HasPrefix(strings.ToLower(line), "qgroupid") || strings.HasPrefix(line, "-") { + continue + } + |