[lxc-devel] [lxd/master] lxd/storage/drivers/btrfs: Don't destroy qgroups
monstermunchkin on Github
lxc-bot at linuxcontainers.org
Mon Mar 23 20:30:06 UTC 2020
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 523 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200323/afe69775/attachment.bin>
-------------- next part --------------
From e47e30c5d6cc44703c118d2141e23263af7d2200 Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Mon, 23 Mar 2020 21:26:36 +0100
Subject: [PATCH] lxd/storage/drivers/btrfs: Don't destroy qgroups
When deleting a qgroup, it's not possible to get the usage of an
instance or volume anymore. Therefore, instead of deleting the qgroup,
we just don't set a limit.
Signed-off-by: Thomas Hipp <thomas.hipp at canonical.com>
---
lxd/storage/drivers/driver_btrfs_volumes.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lxd/storage/drivers/driver_btrfs_volumes.go b/lxd/storage/drivers/driver_btrfs_volumes.go
index af17496ff4..34d89d3247 100644
--- a/lxd/storage/drivers/driver_btrfs_volumes.go
+++ b/lxd/storage/drivers/driver_btrfs_volumes.go
@@ -507,7 +507,7 @@ func (d *btrfs) SetVolumeQuota(vol Volume, size string, op *operations.Operation
}
} else if qgroup != "" {
// Remove the limit.
- _, err := shared.RunCommand("btrfs", "qgroup", "destroy", qgroup, volPath)
+ _, err := shared.RunCommand("btrfs", "qgroup", "limit", "none", qgroup, volPath)
if err != nil {
return err
}
More information about the lxc-devel
mailing list