Bump github.com/containers/storage from 1.25.0 to 1.26.0

Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.25.0 to 1.26.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.25.0...v1.26.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
dependabot-preview[bot]
2021-02-22 09:26:09 +00:00
committed by Valentin Rothberg
parent 15f0d5cd2f
commit be600975a9
40 changed files with 1567 additions and 170 deletions

View File

@@ -145,6 +145,10 @@ func doesMetacopy(d, mountOpts string) (bool, error) {
opts = fmt.Sprintf("%s,%s", opts, data)
}
if err := unix.Mount("overlay", filepath.Join(td, "merged"), "overlay", uintptr(flags), opts); err != nil {
if errors.Cause(err) == unix.EINVAL {
logrus.Info("metacopy option not supported on this kernel", mountOpts)
return false, nil
}
return false, errors.Wrapf(err, "failed to mount overlay for metacopy check with %q options", mountOpts)
}
defer func() {
@@ -163,3 +167,40 @@ func doesMetacopy(d, mountOpts string) (bool, error) {
}
return metacopy != nil, nil
}
// doesVolatile checks if the filesystem supports the "volatile" mount option
func doesVolatile(d string) (bool, error) {
td, err := ioutil.TempDir(d, "volatile-check")
if err != nil {
return false, err
}
defer func() {
if err := os.RemoveAll(td); err != nil {
logrus.Warnf("Failed to remove check directory %v: %v", td, err)
}
}()
if err := os.MkdirAll(filepath.Join(td, "lower"), 0755); err != nil {
return false, err
}
if err := os.MkdirAll(filepath.Join(td, "upper"), 0755); err != nil {
return false, err
}
if err := os.Mkdir(filepath.Join(td, "work"), 0755); err != nil {
return false, err
}
if err := os.Mkdir(filepath.Join(td, "merged"), 0755); err != nil {
return false, err
}
// Mount using the mandatory options and configured options
opts := fmt.Sprintf("volatile,lowerdir=%s,upperdir=%s,workdir=%s", path.Join(td, "lower"), path.Join(td, "upper"), path.Join(td, "work"))
if err := unix.Mount("overlay", filepath.Join(td, "merged"), "overlay", 0, opts); err != nil {
return false, errors.Wrapf(err, "failed to mount overlay for volatile check")
}
defer func() {
if err := unix.Unmount(filepath.Join(td, "merged"), 0); err != nil {
logrus.Warnf("Failed to unmount check directory %v: %v", filepath.Join(td, "merged"), err)
}
}()
return true, nil
}