mirror of
https://github.com/containers/podman.git
synced 2025-12-11 17:27:19 +08:00
vendor: bump c/storage
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
6
vendor/github.com/containers/storage/drivers/overlay/check.go
generated
vendored
6
vendor/github.com/containers/storage/drivers/overlay/check.go
generated
vendored
@@ -263,7 +263,11 @@ func supportsIdmappedLowerLayers(home string) (bool, error) {
|
||||
if err := idmap.CreateIDMappedMount(lowerDir, lowerMappedDir, int(pid)); err != nil {
|
||||
return false, fmt.Errorf("create mapped mount: %w", err)
|
||||
}
|
||||
defer unix.Unmount(lowerMappedDir, unix.MNT_DETACH)
|
||||
defer func() {
|
||||
if err := unix.Unmount(lowerMappedDir, unix.MNT_DETACH); err != nil {
|
||||
logrus.Warnf("Unmount %q: %v", lowerMappedDir, err)
|
||||
}
|
||||
}()
|
||||
|
||||
opts := fmt.Sprintf("lowerdir=%s,upperdir=%s,workdir=%s", lowerMappedDir, upperDir, workDir)
|
||||
flags := uintptr(0)
|
||||
|
||||
30
vendor/github.com/containers/storage/drivers/overlay/overlay.go
generated
vendored
30
vendor/github.com/containers/storage/drivers/overlay/overlay.go
generated
vendored
@@ -688,12 +688,8 @@ func SupportsNativeOverlay(home, runhome string) (bool, error) {
|
||||
}
|
||||
|
||||
func supportsOverlay(home string, homeMagic graphdriver.FsMagic, rootUID, rootGID int) (supportsDType bool, err error) {
|
||||
// We can try to modprobe overlay first
|
||||
|
||||
selinuxLabelTest := selinux.PrivContainerMountLabel()
|
||||
|
||||
exec.Command("modprobe", "overlay").Run()
|
||||
|
||||
logLevel := logrus.ErrorLevel
|
||||
if unshare.IsRootless() {
|
||||
logLevel = logrus.DebugLevel
|
||||
@@ -821,7 +817,9 @@ func (d *Driver) useNaiveDiff() bool {
|
||||
logrus.Info(nativeDiffCacheText)
|
||||
useNaiveDiffOnly = true
|
||||
}
|
||||
cachedFeatureRecord(d.runhome, feature, !useNaiveDiffOnly, nativeDiffCacheText)
|
||||
if err := cachedFeatureRecord(d.runhome, feature, !useNaiveDiffOnly, nativeDiffCacheText); err != nil {
|
||||
logrus.Warnf("Recording overlay native-diff support status: %v", err)
|
||||
}
|
||||
})
|
||||
return useNaiveDiffOnly
|
||||
}
|
||||
@@ -1553,7 +1551,11 @@ func (d *Driver) get(id string, disableShifting bool, options graphdriver.MountO
|
||||
composefsMounts := []string{}
|
||||
defer func() {
|
||||
for _, m := range composefsMounts {
|
||||
defer unix.Unmount(m, unix.MNT_DETACH)
|
||||
defer func(m string) {
|
||||
if err := unix.Unmount(m, unix.MNT_DETACH); err != nil {
|
||||
logrus.Warnf("Unmount %q: %v", m, err)
|
||||
}
|
||||
}(m)
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -1657,7 +1659,11 @@ func (d *Driver) get(id string, disableShifting bool, options graphdriver.MountO
|
||||
skipIDMappingLayers[composefsMount] = composefsMount
|
||||
// overlay takes a reference on the mount, so it is safe to unmount
|
||||
// the mapped idmounts as soon as the final overlay file system is mounted.
|
||||
defer unix.Unmount(composefsMount, unix.MNT_DETACH)
|
||||
defer func() {
|
||||
if err := unix.Unmount(composefsMount, unix.MNT_DETACH); err != nil {
|
||||
logrus.Warnf("Unmount %q: %v", composefsMount, err)
|
||||
}
|
||||
}()
|
||||
}
|
||||
absLowers = append(absLowers, composefsMount)
|
||||
continue
|
||||
@@ -1764,7 +1770,11 @@ func (d *Driver) get(id string, disableShifting bool, options graphdriver.MountO
|
||||
|
||||
// overlay takes a reference on the mount, so it is safe to unmount
|
||||
// the mapped idmounts as soon as the final overlay file system is mounted.
|
||||
defer unix.Unmount(root, unix.MNT_DETACH)
|
||||
defer func() {
|
||||
if err := unix.Unmount(root, unix.MNT_DETACH); err != nil {
|
||||
logrus.Warnf("Unmount %q: %v", root, err)
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
// relative path to the layer through the id mapped mount
|
||||
@@ -2085,7 +2095,9 @@ func (d *Driver) DiffGetter(id string) (_ graphdriver.FileGetCloser, Err error)
|
||||
if Err != nil {
|
||||
for _, f := range composefsMounts {
|
||||
f.Close()
|
||||
unix.Rmdir(f.Name())
|
||||
if err := unix.Rmdir(f.Name()); err != nil && !os.IsNotExist(err) {
|
||||
logrus.Warnf("Failed to remove %s: %v", f.Name(), err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user