summaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2022-06-28 19:14:00 +0000
committerGitHub <noreply@github.com>2022-06-28 19:14:00 +0000
commitf0e8904e0d185e32d44496d8714fbda8e75e04f7 (patch)
tree098311c8d09c95a32c8cb78ce6c4f4f3ced60610 /pkg/domain
parent60c9aeabab950be4b7b1d568c75bd3705bea17ed (diff)
parent6c4c050d3df4f4e952273891bddfeb5b5bd8be5e (diff)
downloadpodman-f0e8904e0d185e32d44496d8714fbda8e75e04f7.tar.gz
podman-f0e8904e0d185e32d44496d8714fbda8e75e04f7.tar.bz2
podman-f0e8904e0d185e32d44496d8714fbda8e75e04f7.zip
Merge pull request #14755 from cdoern/system
fix volume reporting in system df
Diffstat (limited to 'pkg/domain')
-rw-r--r--pkg/domain/infra/abi/system.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/domain/infra/abi/system.go b/pkg/domain/infra/abi/system.go
index 6e26026d4..2bd88ed85 100644
--- a/pkg/domain/infra/abi/system.go
+++ b/pkg/domain/infra/abi/system.go
@@ -319,8 +319,8 @@ func (ic *ContainerEngine) SystemDf(ctx context.Context, options entities.System
}
dfVolumes := make([]*entities.SystemDfVolumeReport, 0, len(vols))
- var reclaimableSize uint64
for _, v := range vols {
+ var reclaimableSize uint64
var consInUse int
mountPoint, err := v.MountPoint()
if err != nil {
@@ -341,7 +341,7 @@ func (ic *ContainerEngine) SystemDf(ctx context.Context, options entities.System
return nil, err
}
if len(inUse) == 0 {
- reclaimableSize += volSize
+ reclaimableSize = volSize
}
for _, viu := range inUse {
if cutil.StringInSlice(viu, runningContainers) {