all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH storage] btrfs: fix qgroup id and size in volume resize
@ 2021-06-24  8:41 Wolfgang Bumiller
  2021-06-24  9:24 ` Thomas Lamprecht
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Bumiller @ 2021-06-24  8:41 UTC (permalink / raw)
  To: pve-devel

also fixes volume_size_info in scalar context for subvols

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
 PVE/Storage/BTRFSPlugin.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/PVE/Storage/BTRFSPlugin.pm b/PVE/Storage/BTRFSPlugin.pm
index 6ae93c2..0d8bf4b 100644
--- a/PVE/Storage/BTRFSPlugin.pm
+++ b/PVE/Storage/BTRFSPlugin.pm
@@ -489,7 +489,7 @@ sub volume_size_info {
 	if ($scfg->{quotas}) {
 	    ($used, $size) = btrfs_subvol_quota($class, $path);
 	}
-	return wantarray ? ($size, 'subvol', $used, undef, $ctime) : 1;
+	return wantarray ? ($size, 'subvol', $used, undef, $ctime) : $size;
     }
 
     return PVE::Storage::Plugin::file_size_info($path, $timeout);
@@ -504,8 +504,8 @@ sub volume_resize {
 	    if !$scfg->{quotas};
 
 	my $path = $class->filesystem_path($scfg, $volname);
-	my $id = '0/' . $class->btrfs_get_subvol_id($path);
-	$class->btrfs_cmd(['qgroup', 'limit', '--', "${size}k", "0/$id", $path]);
+	my $qid = '0/' . $class->btrfs_get_subvol_id($path);
+	$class->btrfs_cmd(['qgroup', 'limit', '--', $size, $qid, $path]);
 	return undef;
     }
 
-- 
2.30.2





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-24  9:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-24  8:41 [pve-devel] [PATCH storage] btrfs: fix qgroup id and size in volume resize Wolfgang Bumiller
2021-06-24  9:24 ` Thomas Lamprecht
2021-06-24  9:57   ` Wolfgang Bumiller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal