[pve-devel] [PATCH container] fix max disk size in container status

Dominik Csapak d.csapak at proxmox.com
Fri Apr 8 16:10:42 CEST 2016


we already get the bytes from parse_ct_rootfs (via JSONParser disk_size),
no need to multiply it again

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/PVE/LXC.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index 238d9f2..fe97d31 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -159,7 +159,7 @@ sub vmstatus {
 	    # use 4GB by default ??
 	    if (my $rootfs = $conf->{rootfs}) {
 		my $rootinfo = PVE::LXC::Config->parse_ct_rootfs($rootfs);
-		$d->{maxdisk} = int(($rootinfo->{size} || 4)*1024*1024)*1024;
+		$d->{maxdisk} = $rootinfo->{size} || (4*1024*1024*1024);
 	    } else {
 		$d->{maxdisk} = 4*1024*1024*1024;
 	    }
-- 
2.1.4





More information about the pve-devel mailing list