Support disk usage in windows snapshot.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2019-10-28 21:25:10 -07:00
parent 4a1a1bc626
commit 8f9eff4fec
2 changed files with 26 additions and 14 deletions

View File

@@ -165,9 +165,8 @@ func (o *snapshotter) Usage(ctx context.Context, key string) (snapshots.Usage, e
return snapshots.Usage{}, err
}
upperPath := o.upperPath(id)
if info.Kind == snapshots.KindActive {
upperPath := o.upperPath(id)
du, err := fs.DiskUsage(ctx, upperPath)
if err != nil {
// TODO(stevvooe): Consider not reporting an error in this case.