github.com/jjyr/docker@v1.5.0-rc2/daemon/daemon_aufs.go (about) 1 // +build !exclude_graphdriver_aufs 2 3 package daemon 4 5 import ( 6 log "github.com/Sirupsen/logrus" 7 "github.com/docker/docker/daemon/graphdriver" 8 "github.com/docker/docker/daemon/graphdriver/aufs" 9 "github.com/docker/docker/graph" 10 ) 11 12 // Given the graphdriver ad, if it is aufs, then migrate it. 13 // If aufs driver is not built, this func is a noop. 14 func migrateIfAufs(driver graphdriver.Driver, root string) error { 15 if ad, ok := driver.(*aufs.Driver); ok { 16 log.Debugf("Migrating existing containers") 17 if err := ad.Migrate(root, graph.SetupInitLayer); err != nil { 18 return err 19 } 20 } 21 return nil 22 }