1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/daemon/daemon_aufs.go
Alexandr Morozov ee7dd44c01 Mass gofmt
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-24 15:11:48 -07:00

22 lines
601 B
Go

// +build !exclude_graphdriver_aufs
package daemon
import (
log "github.com/Sirupsen/logrus"
"github.com/docker/docker/daemon/graphdriver"
"github.com/docker/docker/daemon/graphdriver/aufs"
"github.com/docker/docker/graph"
)
// Given the graphdriver ad, if it is aufs, then migrate it.
// If aufs driver is not built, this func is a noop.
func migrateIfAufs(driver graphdriver.Driver, root string) error {
if ad, ok := driver.(*aufs.Driver); ok {
log.Debugf("Migrating existing containers")
if err := ad.Migrate(root, graph.SetupInitLayer); err != nil {
return err
}
}
return nil
}