]> git.proxmox.com Git - pve-common.git/commitdiff
cgroup v2: io stats: fix parsing disk writes
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 25 Oct 2021 14:24:25 +0000 (16:24 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 27 Oct 2021 10:03:03 +0000 (12:03 +0200)
'wbytes' is for writes, but we accidentally added the value to 'diskread'
which left 'diskwrite' statistics always zero

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/CGroup.pm

index dd9b034c5872eca57292b3a13abae7e5a11d16c5..44b3297a0da6abf1dc4ed1a4c8e28a0bac0167d2 100644 (file)
@@ -263,7 +263,7 @@ sub get_io_stats {
                $res->{diskread} += $b;
            }
            if (my $b = $dev->{wbytes}) {
-               $res->{diskread} += $b;
+               $res->{diskwrite} += $b;
            }
        }