mirror of
https://github.com/containers/skopeo.git
synced 2025-09-27 05:03:41 +00:00
Bump github.com/containers/storage from 1.24.5 to 1.25.0
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.24.5 to 1.25.0. - [Release notes](https://github.com/containers/storage/releases) - [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md) - [Commits](https://github.com/containers/storage/compare/v1.24.5...v1.25.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
committed by
Valentin Rothberg
parent
aff1b6215b
commit
ac5241482c
36
vendor/github.com/containers/storage/drivers/overlay/overlay.go
generated
vendored
36
vendor/github.com/containers/storage/drivers/overlay/overlay.go
generated
vendored
@@ -521,6 +521,18 @@ func (d *Driver) Metadata(id string) (map[string]string, error) {
|
||||
return metadata, nil
|
||||
}
|
||||
|
||||
// ReadWriteDiskUsage returns the disk usage of the writable directory for the ID.
|
||||
// For Overlay, it attempts to check the XFS quota for size, and falls back to
|
||||
// finding the size of the "diff" directory.
|
||||
func (d *Driver) ReadWriteDiskUsage(id string) (*directory.DiskUsage, error) {
|
||||
usage := &directory.DiskUsage{}
|
||||
if d.quotaCtl != nil {
|
||||
err := d.quotaCtl.GetDiskUsage(d.dir(id), usage)
|
||||
return usage, err
|
||||
}
|
||||
return directory.Usage(path.Join(d.dir(id), "diff"))
|
||||
}
|
||||
|
||||
// Cleanup any state created by overlay which should be cleaned when daemon
|
||||
// is being shutdown. For now, we just have to unmount the bind mounted
|
||||
// we had created.
|
||||
@@ -612,17 +624,22 @@ func (d *Driver) create(id, parent string, opts *graphdriver.CreateOpts) (retErr
|
||||
}
|
||||
}()
|
||||
|
||||
if opts != nil && len(opts.StorageOpt) > 0 {
|
||||
driver := &Driver{}
|
||||
if err := d.parseStorageOpt(opts.StorageOpt, driver); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if driver.options.quota.Size > 0 {
|
||||
// Set container disk quota limit
|
||||
if err := d.quotaCtl.SetQuota(dir, driver.options.quota); err != nil {
|
||||
if d.quotaCtl != nil {
|
||||
quota := quota.Quota{}
|
||||
if opts != nil && len(opts.StorageOpt) > 0 {
|
||||
driver := &Driver{}
|
||||
if err := d.parseStorageOpt(opts.StorageOpt, driver); err != nil {
|
||||
return err
|
||||
}
|
||||
if driver.options.quota.Size > 0 {
|
||||
quota.Size = driver.options.quota.Size
|
||||
}
|
||||
|
||||
}
|
||||
// Set container disk quota limit
|
||||
// If it is set to 0, we will track the disk usage, but not enforce a limit
|
||||
if err := d.quotaCtl.SetQuota(dir, quota); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1221,6 +1238,7 @@ func (d *Driver) DiffSize(id string, idMappings *idtools.IDMappings, parent stri
|
||||
if d.useNaiveDiff() || !d.isParent(id, parent) {
|
||||
return d.naiveDiff.DiffSize(id, idMappings, parent, parentMappings, mountLabel)
|
||||
}
|
||||
|
||||
return directory.Size(d.getDiffPath(id))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user