mirror of
https://github.com/containers/podman.git
synced 2025-12-17 21:21:33 +08:00
vendor latest c/{common,image,storage}
To prepare for 5.4.0-rc1. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
17
vendor/github.com/containers/storage/drivers/vfs/driver.go
generated
vendored
17
vendor/github.com/containers/storage/drivers/vfs/driver.go
generated
vendored
@@ -10,6 +10,7 @@ import (
|
||||
"strings"
|
||||
|
||||
graphdriver "github.com/containers/storage/drivers"
|
||||
"github.com/containers/storage/internal/dedup"
|
||||
"github.com/containers/storage/pkg/archive"
|
||||
"github.com/containers/storage/pkg/directory"
|
||||
"github.com/containers/storage/pkg/fileutils"
|
||||
@@ -348,3 +349,19 @@ func (d *Driver) Diff(id string, idMappings *idtools.IDMappings, parent string,
|
||||
func (d *Driver) DiffSize(id string, idMappings *idtools.IDMappings, parent string, parentMappings *idtools.IDMappings, mountLabel string) (size int64, err error) {
|
||||
return d.naiveDiff.DiffSize(id, idMappings, parent, parentMappings, mountLabel)
|
||||
}
|
||||
|
||||
// Dedup performs deduplication of the driver's storage.
|
||||
func (d *Driver) Dedup(req graphdriver.DedupArgs) (graphdriver.DedupResult, error) {
|
||||
var dirs []string
|
||||
for _, layer := range req.Layers {
|
||||
dir := d.dir2(layer, false)
|
||||
if err := fileutils.Exists(dir); err == nil {
|
||||
dirs = append(dirs, dir)
|
||||
}
|
||||
}
|
||||
r, err := dedup.DedupDirs(dirs, req.Options)
|
||||
if err != nil {
|
||||
return graphdriver.DedupResult{}, err
|
||||
}
|
||||
return graphdriver.DedupResult{Deduped: r.Deduped}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user