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
e6656ea8
Commit
e6656ea8
authored
May 05, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a better name.
parent
54b3ccc8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
fuseops/common_op.go
fuseops/common_op.go
+7
-7
No files found.
fuseops/common_op.go
View file @
e6656ea8
...
...
@@ -53,7 +53,7 @@ type commonOp struct {
// A function that is invoked with the error given to Respond, for use in
// closing off traces and reporting back to the connection.
finish
func
(
error
)
finish
ed
func
(
error
)
}
var
gPIDMapMu
sync
.
Mutex
...
...
@@ -156,13 +156,13 @@ func (o *commonOp) init(
op
Op
,
bazilReq
bazilfuse
.
Request
,
log
func
(
int
,
string
,
...
interface
{}),
finish
func
(
error
))
{
finish
ed
func
(
error
))
{
// Initialize basic fields.
o
.
ctx
=
ctx
o
.
op
=
op
o
.
bazilReq
=
bazilReq
o
.
log
=
log
o
.
finish
=
finish
o
.
finish
ed
=
finished
// Set up a context that reflects per-PID tracing if appropriate.
o
.
ctx
=
o
.
maybeTraceByPID
(
o
.
ctx
,
int
(
bazilReq
.
Hdr
()
.
Pid
))
...
...
@@ -172,8 +172,8 @@ func (o *commonOp) init(
o
.
ctx
,
reportForTrace
=
reqtrace
.
StartSpan
(
ctx
,
o
.
op
.
ShortDesc
())
// When the op is finished, report to both reqtrace and the connection.
prevFinish
:=
o
.
finish
o
.
finish
=
func
(
err
error
)
{
prevFinish
:=
o
.
finish
ed
o
.
finish
ed
=
func
(
err
error
)
{
reportForTrace
(
err
)
prevFinish
(
err
)
}
...
...
@@ -210,7 +210,7 @@ func (o *commonOp) respondErr(err error) {
o
.
bazilReq
.
RespondError
(
err
)
// Report back to the connection that we are finished.
o
.
finish
(
err
)
o
.
finish
ed
(
err
)
}
// Respond with the supplied response struct, which must be accepted by a
...
...
@@ -234,5 +234,5 @@ func (o *commonOp) respond(resp interface{}) {
respond
.
Call
([]
reflect
.
Value
{
reflect
.
ValueOf
(
resp
)})
// Report back to the connection that we are finished.
o
.
finish
(
nil
)
o
.
finish
ed
(
nil
)
}
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