[pve-devel] [PATCH manager] correct node free calculation
Dominik Csapak
d.csapak at proxmox.com
Fri May 11 08:15:03 CEST 2018
avail - used is wrong
total - used = free
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
PVE/API2/Nodes.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm
index 25f0e180..2db5e1ec 100644
--- a/PVE/API2/Nodes.pm
+++ b/PVE/API2/Nodes.pm
@@ -289,7 +289,7 @@ __PACKAGE__->register_method({
total => $dinfo->{blocks},
avail => $dinfo->{bavail},
used => $dinfo->{used},
- free => $dinfo->{bavail} - $dinfo->{used},
+ free => $dinfo->{blocks} - $dinfo->{used},
};
return $res;
--
2.11.0
More information about the pve-devel
mailing list