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
ca5f9851
Commit
ca5f9851
authored
Jul 23, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed more errors.
parent
d6a582c6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
internal/fusekernel/fuse_kernel.go
internal/fusekernel/fuse_kernel.go
+5
-5
internal/fuseshim/fuse.go
internal/fuseshim/fuse.go
+8
-8
No files found.
internal/fusekernel/fuse_kernel.go
View file @
ca5f9851
...
...
@@ -43,10 +43,10 @@ import (
// The FUSE version implemented by the package.
const
(
p
rotoVersionMinMajor
=
7
p
rotoVersionMinMinor
=
8
p
rotoVersionMaxMajor
=
7
p
rotoVersionMaxMinor
=
12
P
rotoVersionMinMajor
=
7
P
rotoVersionMinMinor
=
8
P
rotoVersionMaxMajor
=
7
P
rotoVersionMaxMinor
=
12
)
const
(
...
...
@@ -731,7 +731,7 @@ type InHeader struct {
const
inHeaderSize
=
int
(
unsafe
.
Sizeof
(
InHeader
{}))
type
o
utHeader
struct
{
type
O
utHeader
struct
{
Len
uint32
Error
int32
Unique
uint64
...
...
internal/fuseshim/fuse.go
View file @
ca5f9851
...
...
@@ -194,7 +194,7 @@ func initMount(c *Conn, conf *mountConfig) error {
return
fmt
.
Errorf
(
"missing init, got: %T"
,
req
)
}
min
:=
fusekernel
.
Protocol
{
protoVersionMinMajor
,
p
rotoVersionMinMinor
}
min
:=
fusekernel
.
Protocol
{
fusekernel
.
ProtoVersionMinMajor
,
fusekernel
.
P
rotoVersionMinMinor
}
if
r
.
Kernel
.
LT
(
min
)
{
req
.
RespondError
(
Errno
(
syscall
.
EPROTO
))
c
.
Close
()
...
...
@@ -204,7 +204,7 @@ func initMount(c *Conn, conf *mountConfig) error {
}
}
proto
:=
fusekernel
.
Protocol
{
protoVersionMaxMajor
,
p
rotoVersionMaxMinor
}
proto
:=
fusekernel
.
Protocol
{
fusekernel
.
ProtoVersionMaxMajor
,
fusekernel
.
P
rotoVersionMaxMinor
}
if
r
.
Kernel
.
LT
(
proto
)
{
// Kernel doesn't support the latest version we have.
proto
=
r
.
Kernel
...
...
@@ -215,7 +215,7 @@ func initMount(c *Conn, conf *mountConfig) error {
Library
:
proto
,
MaxReadahead
:
conf
.
maxReadahead
,
MaxWrite
:
maxWrite
,
Flags
:
InitBigWrites
|
conf
.
initFlags
,
Flags
:
fusekernel
.
InitBigWrites
|
conf
.
initFlags
,
}
r
.
Respond
(
s
)
return
nil
...
...
@@ -275,7 +275,7 @@ func (h *Header) noResponse() {
}
func
(
h
*
Header
)
respond
(
msg
[]
byte
)
{
out
:=
(
*
o
utHeader
)(
unsafe
.
Pointer
(
&
msg
[
0
]))
out
:=
(
*
fusekernel
.
O
utHeader
)(
unsafe
.
Pointer
(
&
msg
[
0
]))
out
.
Unique
=
uint64
(
h
.
ID
)
h
.
Conn
.
respond
(
msg
)
putMessage
(
h
.
msg
)
...
...
@@ -365,7 +365,7 @@ func (h *Header) RespondError(err error) {
// FUSE uses negative errors!
// TODO: File bug report against OSXFUSE: positive error causes kernel panic.
buf
:=
newBuffer
(
0
)
hOut
:=
(
*
o
utHeader
)(
unsafe
.
Pointer
(
&
buf
[
0
]))
hOut
:=
(
*
fusekernel
.
O
utHeader
)(
unsafe
.
Pointer
(
&
buf
[
0
]))
hOut
.
Error
=
-
int32
(
errno
)
h
.
respond
(
buf
)
}
...
...
@@ -1046,7 +1046,7 @@ func errorString(err error) string {
}
func
(
c
*
Conn
)
writeToKernel
(
msg
[]
byte
)
error
{
out
:=
(
*
o
utHeader
)(
unsafe
.
Pointer
(
&
msg
[
0
]))
out
:=
(
*
fusekernel
.
O
utHeader
)(
unsafe
.
Pointer
(
&
msg
[
0
]))
out
.
Len
=
uint32
(
len
(
msg
))
c
.
wio
.
RLock
()
...
...
@@ -1112,7 +1112,7 @@ func (c *Conn) sendInvalidate(msg []byte) error {
// node.
func
(
c
*
Conn
)
InvalidateNode
(
nodeID
NodeID
,
off
int64
,
size
int64
)
error
{
buf
:=
newBuffer
(
unsafe
.
Sizeof
(
notifyInvalInodeOut
{}))
h
:=
(
*
o
utHeader
)(
unsafe
.
Pointer
(
&
buf
[
0
]))
h
:=
(
*
fusekernel
.
O
utHeader
)(
unsafe
.
Pointer
(
&
buf
[
0
]))
// h.Unique is 0
h
.
Error
=
notifyCodeInvalInode
out
:=
(
*
notifyInvalInodeOut
)(
buf
.
alloc
(
unsafe
.
Sizeof
(
notifyInvalInodeOut
{})))
...
...
@@ -1139,7 +1139,7 @@ func (c *Conn) InvalidateEntry(parent NodeID, name string) error {
return
syscall
.
ENAMETOOLONG
}
buf
:=
newBuffer
(
unsafe
.
Sizeof
(
notifyInvalEntryOut
{})
+
uintptr
(
len
(
name
))
+
1
)
h
:=
(
*
o
utHeader
)(
unsafe
.
Pointer
(
&
buf
[
0
]))
h
:=
(
*
fusekernel
.
O
utHeader
)(
unsafe
.
Pointer
(
&
buf
[
0
]))
// h.Unique is 0
h
.
Error
=
notifyCodeInvalEntry
out
:=
(
*
notifyInvalEntryOut
)(
buf
.
alloc
(
unsafe
.
Sizeof
(
notifyInvalEntryOut
{})))
...
...
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