mirror of https://github.com/docker/docs.git
Merge pull request #9834 from jfrazelle/9820-overlay-btrfs
Add error when running overlay over btrfs.
This commit is contained in:
commit
9d1caf4272
|
@ -99,6 +99,21 @@ func Init(home string, options []string) (graphdriver.Driver, error) {
|
||||||
return nil, graphdriver.ErrNotSupported
|
return nil, graphdriver.ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check if they are running over btrfs
|
||||||
|
var buf syscall.Statfs_t
|
||||||
|
if err := syscall.Statfs(path.Dir(home), &buf); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
switch graphdriver.FsMagic(buf.Type) {
|
||||||
|
case graphdriver.FsMagicBtrfs:
|
||||||
|
log.Error("'overlay' is not supported over btrfs.")
|
||||||
|
return nil, graphdriver.ErrIncompatibleFS
|
||||||
|
case graphdriver.FsMagicAufs:
|
||||||
|
log.Error("'overlay' is not supported over aufs.")
|
||||||
|
return nil, graphdriver.ErrIncompatibleFS
|
||||||
|
}
|
||||||
|
|
||||||
// Create the driver home dir
|
// Create the driver home dir
|
||||||
if err := os.MkdirAll(home, 0755); err != nil && !os.IsExist(err) {
|
if err := os.MkdirAll(home, 0755); err != nil && !os.IsExist(err) {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in New Issue