Commit 43892975 authored by Aaron Jacobs's avatar Aaron Jacobs

Updated newConnection.

parent f650aab1
...@@ -41,6 +41,7 @@ var fTraceByPID = flag.Bool( ...@@ -41,6 +41,7 @@ var fTraceByPID = flag.Bool(
// A connection to the fuse kernel process. // A connection to the fuse kernel process.
type Connection struct { type Connection struct {
debugLogger *log.Logger debugLogger *log.Logger
errorLogger *log.Logger
wrapped *bazilfuse.Conn wrapped *bazilfuse.Conn
opsInFlight sync.WaitGroup opsInFlight sync.WaitGroup
...@@ -69,9 +70,11 @@ type Connection struct { ...@@ -69,9 +70,11 @@ type Connection struct {
func newConnection( func newConnection(
parentCtx context.Context, parentCtx context.Context,
debugLogger *log.Logger, debugLogger *log.Logger,
errorLogger *log.Logger,
wrapped *bazilfuse.Conn) (c *Connection, err error) { wrapped *bazilfuse.Conn) (c *Connection, err error) {
c = &Connection{ c = &Connection{
debugLogger: debugLogger, debugLogger: debugLogger,
errorLogger: errorLogger,
wrapped: wrapped, wrapped: wrapped,
parentCtx: parentCtx, parentCtx: parentCtx,
cancelFuncs: make(map[bazilfuse.RequestID]func()), cancelFuncs: make(map[bazilfuse.RequestID]func()),
...@@ -342,7 +345,13 @@ func (c *Connection) ReadOp() (op fuseops.Op, err error) { ...@@ -342,7 +345,13 @@ func (c *Connection) ReadOp() (op fuseops.Op, err error) {
finished := func(err error) { c.finishOp(bfReq) } finished := func(err error) { c.finishOp(bfReq) }
op = fuseops.Convert(opCtx, bfReq, debugLogForOp, finished) op = fuseops.Convert(
opCtx,
bfReq,
debugLogForOp,
c.errorLogger,
finished)
return return
} }
} }
......
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