Merge pull request #40652 from thaJeztah/19.03_backport_fix_backingfs

[19.03 backport] fix backingFs assignment
This commit is contained in:
Akihiro Suda 2020-03-13 04:42:15 +09:00 committed by GitHub
commit 6ed0f6ab78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View file

@ -136,6 +136,14 @@ func Init(home string, options []string, uidMaps, gidMaps []idtools.IDMap) (grap
return nil, graphdriver.ErrNotSupported
}
fsMagic, err := graphdriver.GetFSMagic(testdir)
if err != nil {
return nil, err
}
if fsName, ok := graphdriver.FsNames[fsMagic]; ok {
backingFs = fsName
}
supportsDType, err := fsutils.SupportsDType(testdir)
if err != nil {
return nil, err

View file

@ -145,6 +145,14 @@ func Init(home string, options []string, uidMaps, gidMaps []idtools.IDMap) (grap
return nil, graphdriver.ErrNotSupported
}
fsMagic, err := graphdriver.GetFSMagic(testdir)
if err != nil {
return nil, err
}
if fsName, ok := graphdriver.FsNames[fsMagic]; ok {
backingFs = fsName
}
supportsDType, err := fsutils.SupportsDType(testdir)
if err != nil {
return nil, err