summaryrefslogtreecommitdiff
path: root/pkg/cgroups/blkio.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-06-19 11:13:18 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-06-26 13:17:02 +0200
commit72cf0c81e86435c1c8daed9bff183b20d6bc400c (patch)
tree09ce3687ec7977ac2a027639e376db3586979bc2 /pkg/cgroups/blkio.go
parentfa1869381301797295dece0aec12435fc902295b (diff)
downloadpodman-72cf0c81e86435c1c8daed9bff183b20d6bc400c.tar.gz
podman-72cf0c81e86435c1c8daed9bff183b20d6bc400c.tar.bz2
podman-72cf0c81e86435c1c8daed9bff183b20d6bc400c.zip
libpod: use pkg/cgroups instead of containerd/cgroups
use the new implementation for dealing with cgroups. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg/cgroups/blkio.go')
-rw-r--r--pkg/cgroups/blkio.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/cgroups/blkio.go b/pkg/cgroups/blkio.go
index 8434703fd..8eb54abec 100644
--- a/pkg/cgroups/blkio.go
+++ b/pkg/cgroups/blkio.go
@@ -59,8 +59,6 @@ func (c *blkioHandler) Stat(ctr *CgroupControl, m *Metrics) error {
}
defer f.Close()
- var ioServiceBytesRecursive []BlkIOEntry
-
scanner := bufio.NewScanner(f)
for scanner.Scan() {
line := scanner.Text()
@@ -95,6 +93,9 @@ func (c *blkioHandler) Stat(ctr *CgroupControl, m *Metrics) error {
}
ioServiceBytesRecursive = append(ioServiceBytesRecursive, entry)
}
+ if err := scanner.Err(); err != nil {
+ return err
+ }
m.Blkio = BlkioMetrics{IoServiceBytesRecursive: ioServiceBytesRecursive}
return nil
}