mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #12903 from rhvgoyal/disable-discards
devmapper: Disable mount option "discard" by default
This commit is contained in:
commit
2e49281bd0
1 changed files with 1 additions and 5 deletions
|
@ -1366,11 +1366,7 @@ func (devices *DeviceSet) MountDevice(hash, path, mountLabel string) error {
|
|||
options = joinMountOptions(options, devices.mountOptions)
|
||||
options = joinMountOptions(options, label.FormatMountLabel("", mountLabel))
|
||||
|
||||
err = syscall.Mount(info.DevName(), path, fstype, flags, joinMountOptions("discard", options))
|
||||
if err != nil && err == syscall.EINVAL {
|
||||
err = syscall.Mount(info.DevName(), path, fstype, flags, options)
|
||||
}
|
||||
if err != nil {
|
||||
if err := syscall.Mount(info.DevName(), path, fstype, flags, options); err != nil {
|
||||
return fmt.Errorf("Error mounting '%s' on '%s': %s", info.DevName(), path, err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue