Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jacobsa-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
jacobsa-fuse
Commits
be9bf672
Commit
be9bf672
authored
May 05, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Connection.ReadOp
parent
4f1efbe4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
connection.go
connection.go
+10
-2
No files found.
connection.go
View file @
be9bf672
...
...
@@ -85,6 +85,12 @@ func (c *Connection) log(
c
.
logger
.
Println
(
msg
)
}
// Set up state for an op that is about to be returned to the user.
func
(
c
*
Connection
)
beginOp
()
// Clean up all state associated with an op to which the user has responded.
func
(
c
*
Connection
)
finishOp
()
// Read the next op from the kernel process. Return io.EOF if the kernel has
// closed the connection.
//
...
...
@@ -122,14 +128,16 @@ func (c *Connection) ReadOp() (op fuseops.Op, err error) {
c
.
log
(
opID
,
calldepth
+
1
,
format
,
v
...
)
}
op
=
fuseops
.
Convert
(
c
.
parentCtx
,
bfReq
,
logForOp
,
&
c
.
opsInFlight
)
finished
:=
func
(
err
error
)
{
c
.
finishOp
()
}
op
=
fuseops
.
Convert
(
c
.
parentCtx
,
bfReq
,
logForOp
,
finished
)
if
op
==
nil
{
c
.
log
(
opID
,
1
,
"-> ENOSYS: %v"
,
bfReq
)
bfReq
.
RespondError
(
ENOSYS
)
continue
}
c
.
opsInFlight
.
Add
(
1
)
c
.
beginOp
(
)
return
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment