1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

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

The mount syscall does not handle string flags like "noatime",
we must use bitmasks like MS_NOATIME instead.

pkg/mount.Mount already handles this work.

Signed-off-by: Carl Henrik Lunde <chlunde@ping.uio.no>
This commit is contained in:
Carl Henrik Lunde 2015-09-08 21:23:44 +02:00
parent 1947ab6c1e
commit 9a64f2bbb3

View file

@ -21,6 +21,7 @@ import (
"github.com/Sirupsen/logrus"
"github.com/docker/docker/daemon/graphdriver"
"github.com/docker/docker/pkg/devicemapper"
"github.com/docker/docker/pkg/mount"
"github.com/docker/docker/pkg/parsers"
"github.com/docker/docker/pkg/units"
"github.com/opencontainers/runc/libcontainer/label"
@ -1718,7 +1719,7 @@ func (devices *DeviceSet) MountDevice(hash, path, mountLabel string) error {
options = joinMountOptions(options, devices.mountOptions)
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)
}