Skip to content
Draft
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
5 changes: 5 additions & 0 deletions connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,11 @@ func (c *Connection) Init() error {
initOp.Flags |= fusekernel.InitAtomicTrunc
}

outArgs := uint64(0)
outArgs |= fusekernel.InitDirectIOAllowMMAP
initOp.Flags |= fusekernel.InitExt
initOp.Flags2 |= uint32(outArgs >> 32)

return c.Reply(ctx, nil)
}

Expand Down
1 change: 1 addition & 0 deletions conversions.go
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,7 @@ func (c *Connection) kernelResponseForOp(
out.CongestionThreshold = 9
out.MaxWrite = o.MaxWrite
out.TimeGran = 1
out.Flags2 = o.Flags2
out.MaxPages = o.MaxPages

default:
Expand Down
8 changes: 7 additions & 1 deletion internal/fusekernel/fuse_kernel.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,15 @@ const (
InitMaxPages InitFlags = 1 << 22
InitCacheSymlinks InitFlags = 1 << 23
InitNoOpendirSupport InitFlags = 1 << 24
InitExt InitFlags = 1 << 30

InitCaseSensitive InitFlags = 1 << 29 // OS X only
InitVolRename InitFlags = 1 << 30 // OS X only
InitXtimes InitFlags = 1 << 31 // OS X only
)

const InitDirectIOAllowMMAP uint64 = 1 << 36

type flagName struct {
bit uint32
name string
Expand Down Expand Up @@ -305,6 +308,7 @@ var initFlagNames = []flagName{
{uint32(InitNoOpenSupport), "InitNoOpenSupport"},
{uint32(InitCacheSymlinks), "InitCacheSymlinks"},
{uint32(InitNoOpendirSupport), "InitNoOpendirSupport"},
{uint32(InitExt), "InitExt"},

{uint32(InitCaseSensitive), "InitCaseSensitive"},
{uint32(InitVolRename), "InitVolRename"},
Expand Down Expand Up @@ -748,7 +752,9 @@ type InitOut struct {
TimeGran uint32
MaxPages uint16
MapAlignment uint16
Unused [8]uint32
Flags2 uint32

Unused [7]uint32
}

type InterruptIn struct {
Expand Down
1 change: 1 addition & 0 deletions ops.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ type initOp struct {
MaxBackground uint16
MaxWrite uint32
MaxPages uint16
Flags2 uint32
}
Loading