github.com/zhouyu0/docker-note@v0.0.0-20190722021225-b8d3825084db/daemon/graphdriver/overlayutils/overlayutils.go (about)

     1  // +build linux
     2  
     3  package overlayutils // import "github.com/docker/docker/daemon/graphdriver/overlayutils"
     4  
     5  import (
     6  	"fmt"
     7  
     8  	"github.com/docker/docker/daemon/graphdriver"
     9  )
    10  
    11  // ErrDTypeNotSupported denotes that the backing filesystem doesn't support d_type.
    12  func ErrDTypeNotSupported(driver, backingFs string) error {
    13  	msg := fmt.Sprintf("%s: the backing %s filesystem is formatted without d_type support, which leads to incorrect behavior.", driver, backingFs)
    14  	if backingFs == "xfs" {
    15  		msg += " Reformat the filesystem with ftype=1 to enable d_type support."
    16  	}
    17  
    18  	if backingFs == "extfs" {
    19  		msg += " Reformat the filesystem (or use tune2fs) with -O filetype flag to enable d_type support."
    20  	}
    21  
    22  	msg += " Backing filesystems without d_type support are not supported."
    23  
    24  	return graphdriver.NotSupportedError(msg)
    25  }