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
4fdecd84
Commit
4fdecd84
authored
May 05, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use new beginOp/finishOp.
parent
365f2197
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
connection.go
connection.go
+8
-6
No files found.
connection.go
View file @
4fdecd84
...
...
@@ -109,12 +109,12 @@ func (c *Connection) finishOp(reqID bazilfuse.RequestID) {
// This function delivers ops in exactly the order they are received from
// /dev/fuse. It must not be called multiple times concurrently.
func
(
c
*
Connection
)
ReadOp
()
(
op
fuseops
.
Op
,
err
error
)
{
var
bfReq
bazilfuse
.
Request
// Keep going until we find a request we know how to convert.
for
{
// Read a bazilfuse request.
var
bfReq
bazilfuse
.
Request
bfReq
,
err
=
c
.
wrapped
.
ReadRequest
()
if
err
!=
nil
{
return
}
...
...
@@ -135,15 +135,17 @@ func (c *Connection) ReadOp() (op fuseops.Op, err error) {
continue
}
// Convert it.
// Set up op dependencies.
var
reqID
bazilfuse
.
RequestID
=
bfReq
.
Hdr
()
.
ID
opCtx
:=
c
.
beginOp
(
reqID
)
logForOp
:=
func
(
calldepth
int
,
format
string
,
v
...
interface
{})
{
c
.
log
(
opID
,
calldepth
+
1
,
format
,
v
...
)
}
finished
:=
func
(
err
error
)
{
c
.
finishOp
()
}
finished
:=
func
(
err
error
)
{
c
.
finishOp
(
reqID
)
}
op
=
fuseops
.
Convert
(
c
.
parentCtx
,
bfReq
,
logForOp
,
finished
)
c
.
beginOp
()
op
=
fuseops
.
Convert
(
opCtx
,
bfReq
,
logForOp
,
finished
)
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