github.com/Prakhar-Agarwal-byte/moby@v0.0.0-20231027092010-a14e3e8ab87e/daemon/graphdriver/zfs/zfs_linux.go (about)

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