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
9334ba57
Commit
9334ba57
authored
Feb 24, 2013
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Actually inspect canSplice setting.
parent
3d0a4381
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
10 deletions
+14
-10
fuse/mountstate_linux.go
fuse/mountstate_linux.go
+11
-8
fuse/request.go
fuse/request.go
+1
-1
splice/splice.go
splice/splice.go
+2
-1
No files found.
fuse/mountstate_linux.go
View file @
9334ba57
...
...
@@ -9,16 +9,19 @@ func (ms *MountState) systemWrite(req *request, header []byte) Status {
}
if
req
.
fdData
!=
nil
{
if
err
:=
ms
.
trySplice
(
header
,
req
,
req
.
fdData
);
err
==
nil
{
req
.
readResult
.
Done
()
return
OK
}
else
{
if
ms
.
canSplice
{
err
:=
ms
.
trySplice
(
header
,
req
,
req
.
fdData
)
if
err
==
nil
{
req
.
readResult
.
Done
()
return
OK
}
log
.
Println
(
"trySplice:"
,
err
)
sz
:=
req
.
flatDataSize
()
buf
:=
ms
.
AllocOut
(
req
,
uint32
(
sz
))
req
.
flatData
,
req
.
status
=
req
.
fdData
.
Bytes
(
buf
)
header
=
req
.
serializeHeader
(
len
(
req
.
flatData
))
}
sz
:=
req
.
flatDataSize
()
buf
:=
ms
.
AllocOut
(
req
,
uint32
(
sz
))
req
.
flatData
,
req
.
status
=
req
.
fdData
.
Bytes
(
buf
)
header
=
req
.
serializeHeader
(
len
(
req
.
flatData
))
}
_
,
err
:=
Writev
(
int
(
ms
.
mountFile
.
Fd
()),
[][]
byte
{
header
,
req
.
flatData
})
...
...
fuse/request.go
View file @
9334ba57
...
...
@@ -116,7 +116,7 @@ func (r *request) OutputDebug() string {
}
else
{
spl
:=
""
if
r
.
fdData
!=
nil
{
spl
=
" (
splice
)"
spl
=
" (
fd data
)"
}
flatStr
=
fmt
.
Sprintf
(
" %d bytes data%s
\n
"
,
r
.
flatDataSize
(),
spl
)
}
...
...
splice/splice.go
View file @
9334ba57
...
...
@@ -32,8 +32,9 @@ func init() {
content
,
err
:=
ioutil
.
ReadFile
(
"/proc/sys/fs/pipe-max-size"
)
if
err
!=
nil
{
maxPipeSize
=
DefaultPipeSize
}
else
{
fmt
.
Sscan
(
string
(
content
),
&
maxPipeSize
)
}
fmt
.
Sscan
(
string
(
content
),
&
maxPipeSize
)
r
,
w
,
err
:=
os
.
Pipe
()
if
err
!=
nil
{
...
...
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