mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #43472 from thaJeztah/no_more_no_d_type
remove deprecated support for overlay(2) on backing FS without d_type (fstype=1)
This commit is contained in:
commit
62ea92ba14
3 changed files with 2 additions and 22 deletions
|
@ -294,18 +294,6 @@ func scanPriorDrivers(root string) map[string]bool {
|
|||
return driversMap
|
||||
}
|
||||
|
||||
// IsInitialized checks if the driver's home-directory exists and is non-empty.
|
||||
func IsInitialized(driverHome string) bool {
|
||||
_, err := os.Stat(driverHome)
|
||||
if os.IsNotExist(err) {
|
||||
return false
|
||||
}
|
||||
if err != nil {
|
||||
logrus.Warnf("graphdriver.IsInitialized: stat failed: %v", err)
|
||||
}
|
||||
return !isEmptyDir(driverHome)
|
||||
}
|
||||
|
||||
// isEmptyDir checks if a directory is empty. It is used to check if prior
|
||||
// storage-driver directories exist. If an error occurs, it also assumes the
|
||||
// directory is not empty (which preserves the behavior _before_ this check
|
||||
|
|
|
@ -147,11 +147,7 @@ func Init(home string, options []string, idMap idtools.IdentityMapping) (graphdr
|
|||
return nil, err
|
||||
}
|
||||
if !supportsDType {
|
||||
if !graphdriver.IsInitialized(home) {
|
||||
return nil, overlayutils.ErrDTypeNotSupported("overlay", backingFs)
|
||||
}
|
||||
// allow running without d_type only for existing setups (#27443)
|
||||
logrus.WithField("storage-driver", "overlay").Warn(overlayutils.ErrDTypeNotSupported("overlay", backingFs))
|
||||
return nil, overlayutils.ErrDTypeNotSupported("overlay", backingFs)
|
||||
}
|
||||
|
||||
currentID := idtools.CurrentIdentity()
|
||||
|
|
|
@ -156,11 +156,7 @@ func Init(home string, options []string, idMap idtools.IdentityMapping) (graphdr
|
|||
return nil, err
|
||||
}
|
||||
if !supportsDType {
|
||||
if !graphdriver.IsInitialized(home) {
|
||||
return nil, overlayutils.ErrDTypeNotSupported("overlay2", backingFs)
|
||||
}
|
||||
// allow running without d_type only for existing setups (#27443)
|
||||
logger.Warn(overlayutils.ErrDTypeNotSupported("overlay2", backingFs))
|
||||
return nil, overlayutils.ErrDTypeNotSupported("overlay2", backingFs)
|
||||
}
|
||||
|
||||
cur := idtools.CurrentIdentity()
|
||||
|
|
Loading…
Add table
Reference in a new issue