Merge pull request #33620 from cpuguy83/skip_size_on_mounted_local_volumes
Do not calculate size for local volumes with mount
This commit is contained in:
commit
135bd20585
|
@ -65,6 +65,13 @@ func (daemon *Daemon) SystemDiskUsage(ctx context.Context) (*types.DiskUsage, er
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
return ctx.Err()
|
return ctx.Err()
|
||||||
default:
|
default:
|
||||||
|
if d, ok := v.(volume.DetailedVolume); ok {
|
||||||
|
// skip local volumes with mount options since these could have external
|
||||||
|
// mounted filesystems that will be slow to enumerate.
|
||||||
|
if len(d.Options()) > 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
name := v.Name()
|
name := v.Name()
|
||||||
refs := daemon.volumes.Refs(v)
|
refs := daemon.volumes.Refs(v)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue