github.com/demonoid81/moby@v0.0.0-20200517203328-62dd8e17c460/daemon/graphdriver/zfs/zfs_linux.go (about)

     1  package zfs // import "github.com/demonoid81/moby/daemon/graphdriver/zfs"
     2  
     3  import (
     4  	"github.com/demonoid81/moby/daemon/graphdriver"
     5  	"github.com/sirupsen/logrus"
     6  )
     7  
     8  func checkRootdirFs(rootDir string) error {
     9  	fsMagic, err := graphdriver.GetFSMagic(rootDir)
    10  	if err != nil {
    11  		return err
    12  	}
    13  	backingFS := "unknown"
    14  	if fsName, ok := graphdriver.FsNames[fsMagic]; ok {
    15  		backingFS = fsName
    16  	}
    17  
    18  	if fsMagic != graphdriver.FsMagicZfs {
    19  		logrus.WithField("root", rootDir).WithField("backingFS", backingFS).WithField("storage-driver", "zfs").Error("No zfs dataset found for root")
    20  		return graphdriver.ErrPrerequisites
    21  	}
    22  
    23  	return nil
    24  }
    25  
    26  func getMountpoint(id string) string {
    27  	return id
    28  }