Bladeren bron

Rename the overlay storage driver

so that docker is started with `docker -d -s overlay` instead of `docker -d -s overlayfs`

Signed-off-by: Lénaïc Huard <lhuard@amadeus.com>
Lénaïc Huard 10 jaren geleden
bovenliggende
commit
d680ca5c96

+ 2 - 2
contrib/check-config.sh

@@ -76,7 +76,7 @@ check_flags() {
 	for flag in "$@"; do
 	for flag in "$@"; do
 		echo "- $(check_flag "$flag")"
 		echo "- $(check_flag "$flag")"
 	done
 	done
-} 
+}
 
 
 if [ ! -e "$CONFIG" ]; then
 if [ ! -e "$CONFIG" ]; then
 	wrap_warning "warning: $CONFIG does not exist, searching other paths for kernel config..."
 	wrap_warning "warning: $CONFIG does not exist, searching other paths for kernel config..."
@@ -165,7 +165,7 @@ echo '- Storage Drivers:'
 	echo '- "'$(wrap_color 'devicemapper' blue)'":'
 	echo '- "'$(wrap_color 'devicemapper' blue)'":'
 	check_flags BLK_DEV_DM DM_THIN_PROVISIONING EXT4_FS EXT4_FS_POSIX_ACL EXT4_FS_SECURITY | sed 's/^/  /'
 	check_flags BLK_DEV_DM DM_THIN_PROVISIONING EXT4_FS EXT4_FS_POSIX_ACL EXT4_FS_SECURITY | sed 's/^/  /'
 
 
-	echo '- "'$(wrap_color 'overlayfs' blue)'":'
+	echo '- "'$(wrap_color 'overlay' blue)'":'
 	check_flags OVERLAY_FS | sed 's/^/  /'
 	check_flags OVERLAY_FS | sed 's/^/  /'
 } | sed 's/^/  /'
 } | sed 's/^/  /'
 echo
 echo

+ 1 - 1
daemon/graphdriver/driver.go

@@ -81,7 +81,7 @@ var (
 		"devicemapper",
 		"devicemapper",
 		"vfs",
 		"vfs",
 		// experimental, has to be enabled manually for now
 		// experimental, has to be enabled manually for now
-		"overlayfs",
+		"overlay",
 	}
 	}
 
 
 	ErrNotSupported   = errors.New("driver not supported")
 	ErrNotSupported   = errors.New("driver not supported")

+ 10 - 10
daemon/graphdriver/overlayfs/overlayfs.go

@@ -50,18 +50,18 @@ func (d *naiveDiffDriverWithApply) ApplyDiff(id, parent string, diff archive.Arc
 	return b, err
 	return b, err
 }
 }
 
 
-// This backend uses the overlayfs union filesystem for containers
+// This backend uses the overlay union filesystem for containers
 // plus hard link file sharing for images.
 // plus hard link file sharing for images.
 
 
 // Each container/image can have a "root" subdirectory which is a plain
 // Each container/image can have a "root" subdirectory which is a plain
-// filesystem hierarchy, or they can use overlayfs.
+// filesystem hierarchy, or they can use overlay.
 
 
-// If they use overlayfs there is a "upper" directory and a "lower-id"
+// If they use overlay there is a "upper" directory and a "lower-id"
 // file, as well as "merged" and "work" directories. The "upper"
 // file, as well as "merged" and "work" directories. The "upper"
 // directory has the upper layer of the overlay, and "lower-id" contains
 // directory has the upper layer of the overlay, and "lower-id" contains
 // the id of the parent whose "root" directory shall be used as the lower
 // the id of the parent whose "root" directory shall be used as the lower
 // layer in the overlay. The overlay itself is mounted in the "merged"
 // layer in the overlay. The overlay itself is mounted in the "merged"
-// directory, and the "work" dir is needed for overlayfs to work.
+// directory, and the "work" dir is needed for overlay to work.
 
 
 // When a overlay layer is created there are two cases, either the
 // When a overlay layer is created there are two cases, either the
 // parent has a "root" dir, then we start out with a empty "upper"
 // parent has a "root" dir, then we start out with a empty "upper"
@@ -90,7 +90,7 @@ type Driver struct {
 }
 }
 
 
 func init() {
 func init() {
-	graphdriver.Register("overlayfs", Init)
+	graphdriver.Register("overlay", Init)
 }
 }
 
 
 func Init(home string, options []string) (graphdriver.Driver, error) {
 func Init(home string, options []string) (graphdriver.Driver, error) {
@@ -112,8 +112,8 @@ func Init(home string, options []string) (graphdriver.Driver, error) {
 }
 }
 
 
 func supportsOverlayfs() error {
 func supportsOverlayfs() error {
-	// We can try to modprobe overlayfs first before looking at
-	// proc/filesystems for when overlayfs is supported
+	// We can try to modprobe overlay first before looking at
+	// proc/filesystems for when overlay is supported
 	exec.Command("modprobe", "overlay").Run()
 	exec.Command("modprobe", "overlay").Run()
 
 
 	f, err := os.Open("/proc/filesystems")
 	f, err := os.Open("/proc/filesystems")
@@ -133,7 +133,7 @@ func supportsOverlayfs() error {
 }
 }
 
 
 func (d *Driver) String() string {
 func (d *Driver) String() string {
-	return "overlayfs"
+	return "overlay"
 }
 }
 
 
 func (d *Driver) Status() [][2]string {
 func (d *Driver) Status() [][2]string {
@@ -175,7 +175,7 @@ func (d *Driver) Create(id string, parent string) (retErr error) {
 		return err
 		return err
 	}
 	}
 
 
-	// If parent has a root, just do a overlayfs to it
+	// If parent has a root, just do a overlay to it
 	parentRoot := path.Join(parentDir, "root")
 	parentRoot := path.Join(parentDir, "root")
 
 
 	if s, err := os.Lstat(parentRoot); err == nil {
 	if s, err := os.Lstat(parentRoot); err == nil {
@@ -301,7 +301,7 @@ func (d *Driver) Put(id string) {
 
 
 	if mount.mounted {
 	if mount.mounted {
 		if err := syscall.Unmount(mount.path, 0); err != nil {
 		if err := syscall.Unmount(mount.path, 0); err != nil {
-			log.Debugf("Failed to unmount %s overlayfs: %v", id, err)
+			log.Debugf("Failed to unmount %s overlay: %v", id, err)
 		}
 		}
 	}
 	}
 
 

+ 3 - 3
docs/sources/reference/commandline/cli.md

@@ -156,7 +156,7 @@ string is equivalent to setting the `--tlsverify` flag. The following are equiva
 ### Daemon storage-driver option
 ### Daemon storage-driver option
 
 
 The Docker daemon has support for several different image layer storage drivers: `aufs`,
 The Docker daemon has support for several different image layer storage drivers: `aufs`,
-`devicemapper`, `btrfs` and `overlayfs`.
+`devicemapper`, `btrfs` and `overlay`.
 
 
 The `aufs` driver is the oldest, but is based on a Linux kernel patch-set that
 The `aufs` driver is the oldest, but is based on a Linux kernel patch-set that
 is unlikely to be merged into the main kernel. These are also known to cause some
 is unlikely to be merged into the main kernel. These are also known to cause some
@@ -175,9 +175,9 @@ To tell the Docker daemon to use `devicemapper`, use
 The `btrfs` driver is very fast for `docker build` - but like `devicemapper` does not
 The `btrfs` driver is very fast for `docker build` - but like `devicemapper` does not
 share executable memory between devices. Use `docker -d -s btrfs -g /mnt/btrfs_partition`.
 share executable memory between devices. Use `docker -d -s btrfs -g /mnt/btrfs_partition`.
 
 
-The `overlayfs` is a very fast union filesystem. It is now merged in the main
+The `overlay` is a very fast union filesystem. It is now merged in the main
 Linux kernel as of [3.18.0](https://lkml.org/lkml/2014/10/26/137).
 Linux kernel as of [3.18.0](https://lkml.org/lkml/2014/10/26/137).
-Call `docker -d -s overlayfs` to use it.
+Call `docker -d -s overlay` to use it.
 
 
 ### Docker exec-driver option
 ### Docker exec-driver option