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
3173e6f3
Commit
3173e6f3
authored
Apr 22, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename fuseRequest to request.
parent
5c47ca23
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
fuse/fuse.go
fuse/fuse.go
+9
-9
No files found.
fuse/fuse.go
View file @
3173e6f3
...
...
@@ -24,7 +24,7 @@ const (
////////////////////////////////////////////////////////////////
// State related to this mount point.
type
fuseR
equest
struct
{
type
r
equest
struct
{
inputBuf
[]
byte
// These split up inputBuf.
...
...
@@ -134,7 +134,7 @@ func (me *MountState) Error(err os.Error) {
}
}
func
(
me
*
MountState
)
Write
(
req
*
fuseR
equest
)
{
func
(
me
*
MountState
)
Write
(
req
*
r
equest
)
{
if
req
.
outHeaderBytes
==
nil
{
return
}
...
...
@@ -193,14 +193,14 @@ func (me *MountState) Stats() string {
////////////////////////////////////////////////////////////////
// Logic for the control loop.
func
(
me
*
MountState
)
newRequest
()
*
fuseR
equest
{
req
:=
new
(
fuseR
equest
)
func
(
me
*
MountState
)
newRequest
()
*
r
equest
{
req
:=
new
(
r
equest
)
req
.
status
=
OK
req
.
inputBuf
=
me
.
buffers
.
AllocBuffer
(
bufSize
)
return
req
}
func
(
me
*
MountState
)
readRequest
(
req
*
fuseR
equest
)
os
.
Error
{
func
(
me
*
MountState
)
readRequest
(
req
*
r
equest
)
os
.
Error
{
n
,
err
:=
me
.
mountFile
.
Read
(
req
.
inputBuf
)
// If we start timing before the read, we may take into
// account waiting for input into the timing.
...
...
@@ -209,7 +209,7 @@ func (me *MountState) readRequest(req *fuseRequest) os.Error {
return
err
}
func
(
me
*
MountState
)
discardRequest
(
req
*
fuseR
equest
)
{
func
(
me
*
MountState
)
discardRequest
(
req
*
r
equest
)
{
endNs
:=
time
.
Nanoseconds
()
dt
:=
endNs
-
req
.
startNs
...
...
@@ -272,7 +272,7 @@ func (me *MountState) loop() {
me
.
mountFile
.
Close
()
}
func
(
me
*
MountState
)
handle
(
req
*
fuseR
equest
)
{
func
(
me
*
MountState
)
handle
(
req
*
r
equest
)
{
defer
me
.
discardRequest
(
req
)
req
.
dispatchNs
=
time
.
Nanoseconds
()
...
...
@@ -292,7 +292,7 @@ func (me *MountState) handle(req *fuseRequest) {
}
}
func
(
me
*
MountState
)
dispatch
(
req
*
fuseR
equest
)
{
func
(
me
*
MountState
)
dispatch
(
req
*
r
equest
)
{
h
:=
req
.
inHeader
argumentSize
,
ok
:=
inputSizeMap
[
int
(
h
.
Opcode
)]
if
!
ok
{
...
...
@@ -460,7 +460,7 @@ func asSlice(ptr unsafe.Pointer, byteCount int) []byte {
return
*
(
*
[]
byte
)(
unsafe
.
Pointer
(
h
))
}
func
serialize
(
req
*
fuseR
equest
,
debug
bool
)
{
func
serialize
(
req
*
r
equest
,
debug
bool
)
{
dataLength
,
ok
:=
outputSizeMap
[
int
(
req
.
inHeader
.
Opcode
)]
if
!
ok
{
log
.
Println
(
"Unknown opcode %d (output)"
,
req
.
inHeader
.
Opcode
)
...
...
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