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

Merge pull request #10534 from unclejack/aufs_enable_dio

daemon/graphdriver/aufs: enable direct io
This commit is contained in:
Tibor Vass 2015-02-06 18:26:09 -05:00
commit 414a37f90a

View file

@ -421,7 +421,7 @@ func (a *Driver) aufsMount(ro []string, rw, target, mountLabel string) (err erro
// Mount options are clipped to page size(4096 bytes). If there are more
// layers then these are remounted individually using append.
b := make([]byte, syscall.Getpagesize()-len(mountLabel)-50) // room for xino & mountLabel
b := make([]byte, syscall.Getpagesize()-len(mountLabel)-54) // room for xino & mountLabel
bp := copy(b, fmt.Sprintf("br:%s=rw", rw))
firstMount := true
@ -445,7 +445,7 @@ func (a *Driver) aufsMount(ro []string, rw, target, mountLabel string) (err erro
}
if firstMount {
data := label.FormatMountLabel(fmt.Sprintf("%s,xino=/dev/shm/aufs.xino", string(b[:bp])), mountLabel)
data := label.FormatMountLabel(fmt.Sprintf("%s,dio,xino=/dev/shm/aufs.xino", string(b[:bp])), mountLabel)
if err = mount("none", target, "aufs", 0, data); err != nil {
return
}