Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pkg/blobfs_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,11 @@ func (n *FSNode) Opendir(ctx context.Context) syscall.Errno {
func (n *FSNode) Open(ctx context.Context, flags uint32) (fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno) {
n.log("Open called with flags: %v", flags)

return nil, 0, fs.OK
if n.filesystem.Config.BlobFs.DirectIO {
flags |= fuse.FOPEN_DIRECT_IO
}

return nil, flags, fs.OK
}

func (n *FSNode) Read(ctx context.Context, f fs.FileHandle, dest []byte, off int64) (fuse.ReadResult, syscall.Errno) {
Expand Down
1 change: 1 addition & 0 deletions pkg/config.default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ grpcMessageSizeBytes: 1000000000
grpcDialTimeoutS: 1
discoveryIntervalS: 5
discoveryMode: metadata
directIO: false
blobfs:
enabled: false
mountPoint: /tmp/test
Expand Down
1 change: 1 addition & 0 deletions pkg/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ type BlobFsConfig struct {
Sources []SourceConfig `key:"sources" json:"sources"`
MaxBackgroundTasks int `key:"maxBackgroundTasks" json:"max_background_tasks"`
MaxReadAheadKB int `key:"maxReadAheadKB" json:"max_read_ahead_kb"`
DirectIO bool `key:"directIO" json:"direct_io"`
}

type SourceConfig struct {
Expand Down