From c57317893a743720a241ae328d1bdf7bd02b1fea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9na=C3=AFc=20Huard?= Date: Sun, 30 Nov 2014 10:14:34 +0100 Subject: [PATCH] Rename overlayfs to overlay MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since Linux 3.18-rc6, overlayfs has been renamed overlay. This change was introduced by the following commit in linux.git: ef94b1864d1ed5be54376404bb23d22ed0481feb ovl: rename filesystem type to "overlay" Signed-off-by: Lénaïc Huard --- contrib/check-config.sh | 2 +- daemon/graphdriver/overlayfs/overlayfs.go | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/contrib/check-config.sh b/contrib/check-config.sh index 54b1359a2..e9fbb21e9 100755 --- a/contrib/check-config.sh +++ b/contrib/check-config.sh @@ -166,7 +166,7 @@ echo '- Storage Drivers:' check_flags BLK_DEV_DM DM_THIN_PROVISIONING EXT4_FS EXT4_FS_POSIX_ACL EXT4_FS_SECURITY | sed 's/^/ /' echo '- "'$(wrap_color 'overlayfs' blue)'":' - check_flags OVERLAYFS_FS | sed 's/^/ /' + check_flags OVERLAY_FS | sed 's/^/ /' } | sed 's/^/ /' echo diff --git a/daemon/graphdriver/overlayfs/overlayfs.go b/daemon/graphdriver/overlayfs/overlayfs.go index a9ce75a37..d7dfcb24a 100644 --- a/daemon/graphdriver/overlayfs/overlayfs.go +++ b/daemon/graphdriver/overlayfs/overlayfs.go @@ -9,7 +9,6 @@ import ( "os" "os/exec" "path" - "strings" "sync" "syscall" @@ -115,7 +114,7 @@ func Init(home string, options []string) (graphdriver.Driver, error) { func supportsOverlayfs() error { // We can try to modprobe overlayfs first before looking at // proc/filesystems for when overlayfs is supported - exec.Command("modprobe", "overlayfs").Run() + exec.Command("modprobe", "overlay").Run() f, err := os.Open("/proc/filesystems") if err != nil { @@ -125,11 +124,11 @@ func supportsOverlayfs() error { s := bufio.NewScanner(f) for s.Scan() { - if strings.Contains(s.Text(), "overlayfs") { + if s.Text() == "nodev\toverlay" { return nil } } - log.Error("'overlayfs' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlayfs support loaded.") + log.Error("'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded.") return graphdriver.ErrNotSupported } @@ -274,7 +273,7 @@ func (d *Driver) Get(id string, mountLabel string) (string, error) { mergedDir := path.Join(dir, "merged") opts := fmt.Sprintf("lowerdir=%s,upperdir=%s,workdir=%s", lowerDir, upperDir, workDir) - if err := syscall.Mount("overlayfs", mergedDir, "overlayfs", 0, label.FormatMountLabel(opts, mountLabel)); err != nil { + if err := syscall.Mount("overlay", mergedDir, "overlay", 0, label.FormatMountLabel(opts, mountLabel)); err != nil { return "", err } mount.path = mergedDir