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

fuse: provide InitIn/InitOut.Flags64()

Change-Id: I7e23afdfeb6ff65211f6ac3413e8e86e66341313
parent 4df83d57
......@@ -99,7 +99,7 @@ func doInit(server *Server, req *request) {
return
}
kernelFlags := uint64(input.Flags) | uint64(input.Flags2)<<32
kernelFlags := input.Flags64()
server.reqMu.Lock()
server.kernelSettings = *input
kernelFlags &= (CAP_ASYNC_READ | CAP_BIG_WRITES | CAP_FILE_OPS |
......
......@@ -222,13 +222,13 @@ func (in *OpenOut) string() string {
func (in *InitIn) string() string {
return fmt.Sprintf("{%d.%d Ra %d %s}",
in.Major, in.Minor, in.MaxReadAhead,
flagString(initFlagNames, int64(in.Flags)|(int64(in.Flags2)<<32), ""))
flagString(initFlagNames, int64(in.Flags64()), ""))
}
func (o *InitOut) string() string {
return fmt.Sprintf("{%d.%d Ra %d %s %d/%d Wr %d Tg %d MaxPages %d MaxStack %d}",
o.Major, o.Minor, o.MaxReadAhead,
flagString(initFlagNames, int64(o.Flags)|int64(o.Flags2)<<32, ""),
flagString(initFlagNames, int64(o.Flags64()), ""),
o.CongestionThreshold, o.MaxBackground, o.MaxWrite,
o.TimeGran, o.MaxPages, o.MaxStackDepth)
}
......
......@@ -322,6 +322,10 @@ type InitIn struct {
Unused [11]uint32
}
func (i *InitIn) Flags64() uint64 {
return uint64(i.Flags) | uint64(i.Flags2)<<32
}
type InitOut struct {
Major uint32
Minor uint32
......@@ -338,6 +342,10 @@ type InitOut struct {
Unused [6]uint32
}
func (o *InitOut) Flags64() uint64 {
return uint64(o.Flags) | uint64(o.Flags2)<<32
}
type _CuseInitIn struct {
InHeader
Major uint32
......
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