Browse code

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

Use pkg/mount to support more flags in dm.mountopt

Michael Crosby authored on 2015/10/09 08:02:50
Showing 1 changed files
... ...
@@ -21,6 +21,7 @@ import (
21 21
 	"github.com/Sirupsen/logrus"
22 22
 	"github.com/docker/docker/daemon/graphdriver"
23 23
 	"github.com/docker/docker/pkg/devicemapper"
24
+	"github.com/docker/docker/pkg/mount"
24 25
 	"github.com/docker/docker/pkg/parsers"
25 26
 	"github.com/docker/docker/pkg/units"
26 27
 	"github.com/opencontainers/runc/libcontainer/label"
... ...
@@ -2004,7 +2005,7 @@ func (devices *DeviceSet) MountDevice(hash, path, mountLabel string) error {
2004 2004
 	options = joinMountOptions(options, devices.mountOptions)
2005 2005
 	options = joinMountOptions(options, label.FormatMountLabel("", mountLabel))
2006 2006
 
2007
-	if err := syscall.Mount(info.DevName(), path, fstype, syscall.MS_MGC_VAL, options); err != nil {
2007
+	if err := mount.Mount(info.DevName(), path, fstype, options); err != nil {
2008 2008
 		return fmt.Errorf("Error mounting '%s' on '%s': %s", info.DevName(), path, err)
2009 2009
 	}
2010 2010