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
cd47dbb4
Commit
cd47dbb4
authored
Jul 24, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactored fields a bit.
parent
ee2b9618
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
connection.go
connection.go
+10
-3
No files found.
connection.go
View file @
cd47dbb4
...
...
@@ -38,6 +38,11 @@ type Connection struct {
errorLogger
*
log
.
Logger
wrapped
*
fuseshim
.
Conn
// The device through which we're talking to the kernel, and the protocol
// version that we're using to talk to it.
dev
*
os
.
File
protocol
fusekernel
.
Protocol
// The context from which all op contexts inherit.
parentCtx
context
.
Context
...
...
@@ -66,6 +71,8 @@ func newConnection(
debugLogger
:
debugLogger
,
errorLogger
:
errorLogger
,
wrapped
:
wrapped
,
dev
:
wrapped
.
Dev
,
protocol
:
wrapped
.
Protocol
(),
parentCtx
:
parentCtx
,
cancelFuncs
:
make
(
map
[
uint64
]
func
()),
}
...
...
@@ -225,7 +232,7 @@ func (c *Connection) readMessage() (m *buffer.InMessage, err error) {
// Loop past transient errors.
for
{
// Attempt a reaed.
err
=
m
.
Init
(
c
.
wrapped
.
D
ev
)
err
=
m
.
Init
(
c
.
d
ev
)
// Special cases:
//
...
...
@@ -258,7 +265,7 @@ func (c *Connection) readMessage() (m *buffer.InMessage, err error) {
// Write the supplied message to the kernel.
func
(
c
*
Connection
)
writeMessage
(
msg
[]
byte
)
(
err
error
)
{
// Avoid the retry loop in os.File.Write.
n
,
err
:=
syscall
.
Write
(
int
(
c
.
wrapped
.
D
ev
.
Fd
()),
msg
)
n
,
err
:=
syscall
.
Write
(
int
(
c
.
d
ev
.
Fd
()),
msg
)
if
err
!=
nil
{
return
}
...
...
@@ -341,7 +348,7 @@ func (c *Connection) ReadOp() (op fuseops.Op, err error) {
op
,
err
=
fuseops
.
Convert
(
opCtx
,
m
,
c
.
wrapped
.
Protocol
()
,
c
.
protocol
,
debugLogForOp
,
c
.
errorLogger
,
sendReply
)
...
...
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