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