Commit e94535cd authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Cleanup hard coded constants.

parent 50d69866
...@@ -11,8 +11,11 @@ import ( ...@@ -11,8 +11,11 @@ import (
"syscall" "syscall"
) )
// TODO make generic option setting.
const ( const (
bufSize = 66000 maxRead = (1 << 16)
bufSize = maxRead + 1024
) )
type Empty interface{} type Empty interface{}
...@@ -436,7 +439,7 @@ func initFuse(state *MountState, h *InHeader, input *InitIn) (Empty, Status) { ...@@ -436,7 +439,7 @@ func initFuse(state *MountState, h *InHeader, input *InitIn) (Empty, Status) {
out.Minor = FUSE_KERNEL_MINOR_VERSION out.Minor = FUSE_KERNEL_MINOR_VERSION
out.MaxReadAhead = input.MaxReadAhead out.MaxReadAhead = input.MaxReadAhead
out.Flags = FUSE_ASYNC_READ | FUSE_POSIX_LOCKS out.Flags = FUSE_ASYNC_READ | FUSE_POSIX_LOCKS
out.MaxWrite = 65536 out.MaxWrite = maxRead
return out, OK return out, OK
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment