Browse Source

Merge pull request #16152 from chlunde/devmapper-mount-flags

Use pkg/mount to support more flags in dm.mountopt
Michael Crosby 9 years ago
parent
commit
6d9a84bcd0
1 changed files with 2 additions and 1 deletions
  1. 2 1
      daemon/graphdriver/devmapper/deviceset.go

+ 2 - 1
daemon/graphdriver/devmapper/deviceset.go

@@ -21,6 +21,7 @@ import (
 	"github.com/Sirupsen/logrus"
 	"github.com/Sirupsen/logrus"
 	"github.com/docker/docker/daemon/graphdriver"
 	"github.com/docker/docker/daemon/graphdriver"
 	"github.com/docker/docker/pkg/devicemapper"
 	"github.com/docker/docker/pkg/devicemapper"
+	"github.com/docker/docker/pkg/mount"
 	"github.com/docker/docker/pkg/parsers"
 	"github.com/docker/docker/pkg/parsers"
 	"github.com/docker/docker/pkg/units"
 	"github.com/docker/docker/pkg/units"
 	"github.com/opencontainers/runc/libcontainer/label"
 	"github.com/opencontainers/runc/libcontainer/label"
@@ -2004,7 +2005,7 @@ func (devices *DeviceSet) MountDevice(hash, path, mountLabel string) error {
 	options = joinMountOptions(options, devices.mountOptions)
 	options = joinMountOptions(options, devices.mountOptions)
 	options = joinMountOptions(options, label.FormatMountLabel("", mountLabel))
 	options = joinMountOptions(options, label.FormatMountLabel("", mountLabel))
 
 
-	if err := syscall.Mount(info.DevName(), path, fstype, syscall.MS_MGC_VAL, options); err != nil {
+	if err := mount.Mount(info.DevName(), path, fstype, options); err != nil {
 		return fmt.Errorf("Error mounting '%s' on '%s': %s", info.DevName(), path, err)
 		return fmt.Errorf("Error mounting '%s' on '%s': %s", info.DevName(), path, err)
 	}
 	}