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
e7726398
Commit
e7726398
authored
Dec 29, 2010
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Threading fixes: one input buffer per goroutine, allow debug with
threaded.
parent
9ab6ad5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
fuse/fuse.go
fuse/fuse.go
+3
-4
No files found.
fuse/fuse.go
View file @
e7726398
...
@@ -196,10 +196,9 @@ func (self *MountState) syncWrite(packet [][]byte) {
...
@@ -196,10 +196,9 @@ func (self *MountState) syncWrite(packet [][]byte) {
// Logic for the control loop.
// Logic for the control loop.
func
(
self
*
MountState
)
loop
()
{
func
(
self
*
MountState
)
loop
()
{
buf
:=
make
([]
byte
,
bufSize
)
// See fuse_kern_chan_receive()
// See fuse_kern_chan_receive()
for
{
for
{
buf
:=
make
([]
byte
,
bufSize
)
n
,
err
:=
self
.
mountFile
.
Read
(
buf
)
n
,
err
:=
self
.
mountFile
.
Read
(
buf
)
if
err
!=
nil
{
if
err
!=
nil
{
errNo
:=
OsErrorToFuseError
(
err
)
errNo
:=
OsErrorToFuseError
(
err
)
...
@@ -224,7 +223,7 @@ func (self *MountState) loop() {
...
@@ -224,7 +223,7 @@ func (self *MountState) loop() {
break
break
}
}
if
self
.
threaded
&&
!
self
.
Debug
{
if
self
.
threaded
{
go
self
.
handle
(
buf
[
0
:
n
])
go
self
.
handle
(
buf
[
0
:
n
])
}
else
{
}
else
{
self
.
handle
(
buf
[
0
:
n
])
self
.
handle
(
buf
[
0
:
n
])
...
@@ -372,7 +371,7 @@ func dispatch(state *MountState, h *InHeader, arg *bytes.Buffer) (outBytes [][]b
...
@@ -372,7 +371,7 @@ func dispatch(state *MountState, h *InHeader, arg *bytes.Buffer) (outBytes [][]b
// TODO - figure out how to support this
// TODO - figure out how to support this
// case FUSE_INTERRUPT
// case FUSE_INTERRUPT
default
:
default
:
state
.
Error
(
os
.
NewError
(
fmt
.
Sprintf
(
"Unsupported OpCode: %d
"
,
h
.
Opcode
)))
state
.
Error
(
os
.
NewError
(
fmt
.
Sprintf
(
"Unsupported OpCode: %d
=%v"
,
h
.
Opcode
,
operationName
(
h
.
Opcode
)
)))
return
serialize
(
h
,
ENOSYS
,
nil
,
false
)
return
serialize
(
h
,
ENOSYS
,
nil
,
false
)
}
}
...
...
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