Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-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
go-fuse
Commits
6217b933
Commit
6217b933
authored
Mar 08, 2019
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nodefs: receiver names
parent
e3aa8032
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
nodefs/default.go
nodefs/default.go
+5
-5
No files found.
nodefs/default.go
View file @
6217b933
...
@@ -41,21 +41,21 @@ var _ Operations = &DefaultOperations{}
...
@@ -41,21 +41,21 @@ var _ Operations = &DefaultOperations{}
//
//
// To read node.inode atomic.LoadPointer is used, however it is not expensive
// To read node.inode atomic.LoadPointer is used, however it is not expensive
// since it translates to regular MOVQ on amd64.
// since it translates to regular MOVQ on amd64.
func
(
d
n
*
DefaultOperations
)
setInode
(
inode
*
Inode
)
bool
{
func
(
n
*
DefaultOperations
)
setInode
(
inode
*
Inode
)
bool
{
return
atomic
.
CompareAndSwapPointer
(
return
atomic
.
CompareAndSwapPointer
(
(
*
unsafe
.
Pointer
)(
unsafe
.
Pointer
(
&
d
n
.
inode_
)),
(
*
unsafe
.
Pointer
)(
unsafe
.
Pointer
(
&
n
.
inode_
)),
nil
,
unsafe
.
Pointer
(
inode
))
nil
,
unsafe
.
Pointer
(
inode
))
}
}
func
(
d
n
*
DefaultOperations
)
StatFs
(
ctx
context
.
Context
,
out
*
fuse
.
StatfsOut
)
fuse
.
Status
{
func
(
n
*
DefaultOperations
)
StatFs
(
ctx
context
.
Context
,
out
*
fuse
.
StatfsOut
)
fuse
.
Status
{
// this should be defined on OSX, or the FS won't mount
// this should be defined on OSX, or the FS won't mount
*
out
=
fuse
.
StatfsOut
{}
*
out
=
fuse
.
StatfsOut
{}
return
fuse
.
OK
return
fuse
.
OK
}
}
func
(
d
n
*
DefaultOperations
)
inode
()
*
Inode
{
func
(
n
*
DefaultOperations
)
inode
()
*
Inode
{
return
(
*
Inode
)(
atomic
.
LoadPointer
(
return
(
*
Inode
)(
atomic
.
LoadPointer
(
(
*
unsafe
.
Pointer
)(
unsafe
.
Pointer
(
&
d
n
.
inode_
))))
(
*
unsafe
.
Pointer
)(
unsafe
.
Pointer
(
&
n
.
inode_
))))
}
}
func
(
n
*
DefaultOperations
)
Lookup
(
ctx
context
.
Context
,
name
string
,
out
*
fuse
.
EntryOut
)
(
*
Inode
,
fuse
.
Status
)
{
func
(
n
*
DefaultOperations
)
Lookup
(
ctx
context
.
Context
,
name
string
,
out
*
fuse
.
EntryOut
)
(
*
Inode
,
fuse
.
Status
)
{
...
...
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