[pve-devel] [PATCH common] cgroupv: fix parsing disk writes for cgroup v2
Dominik Csapak
d.csapak at proxmox.com
Mon Oct 25 16:24:25 CEST 2021
'wbytes' is for writes, but we accidentally added the value to 'diskread'
which left 'diskwrite' always zero
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
src/PVE/CGroup.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/CGroup.pm b/src/PVE/CGroup.pm
index dd9b034..44b3297 100644
--- a/src/PVE/CGroup.pm
+++ b/src/PVE/CGroup.pm
@@ -263,7 +263,7 @@ sub get_io_stats {
$res->{diskread} += $b;
}
if (my $b = $dev->{wbytes}) {
- $res->{diskread} += $b;
+ $res->{diskwrite} += $b;
}
}
--
2.30.2
More information about the pve-devel
mailing list