zfs_linux.go 556 B

123456789101112131415161718192021222324252627
  1. package zfs
  2. import (
  3. "fmt"
  4. "syscall"
  5. "github.com/Sirupsen/logrus"
  6. "github.com/docker/docker/daemon/graphdriver"
  7. )
  8. func checkRootdirFs(rootdir string) error {
  9. var buf syscall.Statfs_t
  10. if err := syscall.Statfs(rootdir, &buf); err != nil {
  11. return fmt.Errorf("Failed to access '%s': %s", rootdir, err)
  12. }
  13. if graphdriver.FsMagic(buf.Type) != graphdriver.FsMagicZfs {
  14. logrus.Debugf("[zfs] no zfs dataset found for rootdir '%s'", rootdir)
  15. return graphdriver.ErrPrerequisites
  16. }
  17. return nil
  18. }
  19. func getMountpoint(id string) string {
  20. return id
  21. }