Add configuration to control async reads (#105)
parent
10d864429b
commit
95fc8d1181
|
@ -7,6 +7,7 @@
|
||||||
*.so
|
*.so
|
||||||
|
|
||||||
# Folders
|
# Folders
|
||||||
|
.idea/
|
||||||
_obj
|
_obj
|
||||||
_test
|
_test
|
||||||
|
|
||||||
|
|
|
@ -161,6 +161,11 @@ func (c *Connection) Init() error {
|
||||||
|
|
||||||
// Tell the kernel not to use pitifully small 4 KiB writes.
|
// Tell the kernel not to use pitifully small 4 KiB writes.
|
||||||
initOp.Flags |= fusekernel.InitBigWrites
|
initOp.Flags |= fusekernel.InitBigWrites
|
||||||
|
|
||||||
|
if c.cfg.EnableAsyncReads {
|
||||||
|
initOp.Flags |= fusekernel.InitAsyncRead
|
||||||
|
}
|
||||||
|
|
||||||
// kernel 4.20 increases the max from 32 -> 256
|
// kernel 4.20 increases the max from 32 -> 256
|
||||||
initOp.Flags |= fusekernel.InitMaxPages
|
initOp.Flags |= fusekernel.InitMaxPages
|
||||||
initOp.MaxPages = 256
|
initOp.MaxPages = 256
|
||||||
|
|
|
@ -174,6 +174,10 @@ type MountConfig struct {
|
||||||
// /proc/mounts will show the filesystem type as fuse.<Subtype>.
|
// /proc/mounts will show the filesystem type as fuse.<Subtype>.
|
||||||
// If not set, /proc/mounts will show the filesystem type as fuse/fuseblk.
|
// If not set, /proc/mounts will show the filesystem type as fuse/fuseblk.
|
||||||
Subtype string
|
Subtype string
|
||||||
|
|
||||||
|
// Flag to enable async reads that are received from
|
||||||
|
// the kernel
|
||||||
|
EnableAsyncReads bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a map containing all of the key=value mount options to be given to
|
// Create a map containing all of the key=value mount options to be given to
|
||||||
|
|
Loading…
Reference in New Issue