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:
21
vendor/github.com/containers/storage/drivers/overlay/overlay.go
generated
vendored
21
vendor/github.com/containers/storage/drivers/overlay/overlay.go
generated
vendored
@@ -22,6 +22,7 @@ import (
|
||||
graphdriver "github.com/containers/storage/drivers"
|
||||
"github.com/containers/storage/drivers/overlayutils"
|
||||
"github.com/containers/storage/drivers/quota"
|
||||
"github.com/containers/storage/internal/dedup"
|
||||
"github.com/containers/storage/pkg/archive"
|
||||
"github.com/containers/storage/pkg/chrootarchive"
|
||||
"github.com/containers/storage/pkg/directory"
|
||||
@@ -1096,6 +1097,7 @@ func (d *Driver) create(id, parent string, opts *graphdriver.CreateOpts, readOnl
|
||||
}
|
||||
|
||||
if d.options.forceMask != nil {
|
||||
st.Mode |= os.ModeDir
|
||||
if err := idtools.SetContainersOverrideXattr(diff, st); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -2740,3 +2742,22 @@ func getMappedMountRoot(path string) string {
|
||||
}
|
||||
return dirName
|
||||
}
|
||||
|
||||
// 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, _, inAdditionalStore := d.dir2(layer, false)
|
||||
if inAdditionalStore {
|
||||
continue
|
||||
}
|
||||
if err := fileutils.Exists(dir); err == nil {
|
||||
dirs = append(dirs, filepath.Join(dir, "diff"))
|
||||
}
|
||||
}
|
||||
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