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
Levin Zimmermann
go-fuse
Commits
b36e1a46
Commit
b36e1a46
authored
Jul 08, 2013
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuse: hide internal type _BatchForgetIn.
parent
8eccfcb4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
8 deletions
+10
-8
fuse/opcode.go
fuse/opcode.go
+5
-5
fuse/print.go
fuse/print.go
+1
-1
fuse/types.go
fuse/types.go
+4
-2
No files found.
fuse/opcode.go
View file @
b36e1a46
...
...
@@ -230,8 +230,8 @@ func doForget(server *Server, req *request) {
}
func
doBatchForget
(
server
*
Server
,
req
*
request
)
{
in
:=
(
*
BatchForgetIn
)(
req
.
inData
)
wantBytes
:=
uintptr
(
in
.
Count
)
*
(
unsafe
.
Sizeof
(
ForgetIn
{})
-
unsafe
.
Sizeof
(
InHeader
{})
)
in
:=
(
*
_
BatchForgetIn
)(
req
.
inData
)
wantBytes
:=
uintptr
(
in
.
Count
)
*
unsafe
.
Sizeof
(
_ForgetOne
{}
)
if
uintptr
(
len
(
req
.
arg
))
<
wantBytes
{
// We have no return value to complain, so log an error.
log
.
Printf
(
"Too few bytes for batch forget. Got %d bytes, want %d (%d entries)"
,
...
...
@@ -240,7 +240,7 @@ func doBatchForget(server *Server, req *request) {
h
:=
&
reflect
.
SliceHeader
{
uintptr
(
unsafe
.
Pointer
(
&
req
.
arg
[
0
])),
int
(
in
.
Count
),
int
(
in
.
Count
)}
forgets
:=
*
(
*
[]
ForgetOne
)(
unsafe
.
Pointer
(
h
))
forgets
:=
*
(
*
[]
_
ForgetOne
)(
unsafe
.
Pointer
(
h
))
for
_
,
f
:=
range
forgets
{
server
.
fileSystem
.
Forget
(
f
.
NodeId
,
f
.
Nlookup
)
}
...
...
@@ -399,7 +399,7 @@ func init() {
for
op
,
sz
:=
range
map
[
int32
]
uintptr
{
_OP_FORGET
:
unsafe
.
Sizeof
(
ForgetIn
{}),
_OP_BATCH_FORGET
:
unsafe
.
Sizeof
(
BatchForgetIn
{}),
_OP_BATCH_FORGET
:
unsafe
.
Sizeof
(
_
BatchForgetIn
{}),
_OP_GETATTR
:
unsafe
.
Sizeof
(
GetAttrIn
{}),
_OP_SETATTR
:
unsafe
.
Sizeof
(
SetAttrIn
{}),
_OP_MKNOD
:
unsafe
.
Sizeof
(
MknodIn
{}),
...
...
@@ -582,7 +582,7 @@ func init() {
_OP_READDIR
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
ReadIn
)(
ptr
)
},
_OP_ACCESS
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
AccessIn
)(
ptr
)
},
_OP_FORGET
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
ForgetIn
)(
ptr
)
},
_OP_BATCH_FORGET
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
BatchForgetIn
)(
ptr
)
},
_OP_BATCH_FORGET
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
_
BatchForgetIn
)(
ptr
)
},
_OP_LINK
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
LinkIn
)(
ptr
)
},
_OP_MKDIR
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
MkdirIn
)(
ptr
)
},
_OP_RELEASE
:
func
(
ptr
unsafe
.
Pointer
)
interface
{}
{
return
(
*
ReleaseIn
)(
ptr
)
},
...
...
fuse/print.go
View file @
b36e1a46
...
...
@@ -93,7 +93,7 @@ func (me *ForgetIn) string() string {
return
fmt
.
Sprintf
(
"{%d}"
,
me
.
Nlookup
)
}
func
(
me
*
BatchForgetIn
)
string
()
string
{
func
(
me
*
_
BatchForgetIn
)
string
()
string
{
return
fmt
.
Sprintf
(
"{%d}"
,
me
.
Count
)
}
...
...
fuse/types.go
View file @
b36e1a46
...
...
@@ -37,12 +37,14 @@ type ForgetIn struct {
Nlookup
uint64
}
type
ForgetOne
struct
{
// batch forget is handled internally.
type
_ForgetOne
struct
{
NodeId
uint64
Nlookup
uint64
}
type
BatchForgetIn
struct
{
// batch forget is handled internally.
type
_BatchForgetIn
struct
{
InHeader
Count
uint32
Dummy
uint32
...
...
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