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
9c2f2652
Commit
9c2f2652
authored
Jul 24, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Write replies to the kernel.
parent
b6ae9475
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
connection.go
connection.go
+9
-4
internal/fuseshim/fuse.go
internal/fuseshim/fuse.go
+3
-3
No files found.
connection.go
View file @
9c2f2652
...
...
@@ -237,14 +237,19 @@ func (c *Connection) ReadOp() (op fuseops.Op, err error) {
fuseID
uint64
,
replyMsg
[]
byte
,
opErr
error
)
(
err
error
)
{
// Make sure we destroy the message, as required by
// fuseshim.Connection.ReadMessage.
defer
m
.
Destroy
()
// Clean up state for this op.
c
.
finishOp
(
m
.
Hdr
.
Opcode
,
m
.
Hdr
.
Unique
)
// Send the reply to the kernel.
panic
(
"TODO"
)
// Destroy the message, as required by fuseshim.Connection.ReadMessage.
m
.
Destroy
()
err
=
c
.
wrapped
.
WriteToKernel
(
replyMsg
)
if
err
!=
nil
{
err
=
fmt
.
Errorf
(
"WriteToKernel: %v"
,
err
)
return
}
return
}
...
...
internal/fuseshim/fuse.go
View file @
9c2f2652
...
...
@@ -1061,7 +1061,7 @@ func errorString(err error) string {
return
err
.
Error
()
}
func
(
c
*
Conn
)
w
riteToKernel
(
msg
[]
byte
)
error
{
func
(
c
*
Conn
)
W
riteToKernel
(
msg
[]
byte
)
error
{
out
:=
(
*
fusekernel
.
OutHeader
)(
unsafe
.
Pointer
(
&
msg
[
0
]))
out
.
Len
=
uint32
(
len
(
msg
))
...
...
@@ -1072,7 +1072,7 @@ func (c *Conn) writeToKernel(msg []byte) error {
}
func
(
c
*
Conn
)
respond
(
msg
[]
byte
)
{
c
.
w
riteToKernel
(
msg
)
c
.
W
riteToKernel
(
msg
)
}
type
notCachedError
struct
{}
...
...
@@ -1097,7 +1097,7 @@ var (
//
// A returned ENOENT is translated to a friendlier error.
func
(
c
*
Conn
)
sendInvalidate
(
msg
[]
byte
)
error
{
switch
err
:=
c
.
w
riteToKernel
(
msg
);
err
{
switch
err
:=
c
.
W
riteToKernel
(
msg
);
err
{
case
syscall
.
ENOENT
:
return
ErrNotCached
default
:
...
...
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