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
13019c9b
Commit
13019c9b
authored
Jul 22, 2012
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't fail in grow() if the pair is big enough.
parent
01d1fc58
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
fuse/mountstate.go
fuse/mountstate.go
+1
-1
splice/pair.go
splice/pair.go
+4
-4
No files found.
fuse/mountstate.go
View file @
13019c9b
...
...
@@ -423,7 +423,7 @@ func (ms *MountState) TrySplice(header []byte, req *request, fdData *ReadResultF
_
,
err
=
pair
.
WriteTo
(
ms
.
mountFile
.
Fd
(),
total
)
if
err
!=
nil
{
return
fmt
.
Errorf
(
"splice write: %v"
,
err
)
return
err
}
return
nil
}
...
...
splice/pair.go
View file @
13019c9b
...
...
@@ -17,15 +17,15 @@ func (p *Pair) MaxGrow() {
}
func
(
p
*
Pair
)
Grow
(
n
int
)
bool
{
if
n
<=
p
.
size
{
return
true
}
if
!
resizable
{
return
false
}
if
n
>
maxPipeSize
{
return
false
}
if
n
<=
p
.
size
{
return
true
}
newsize
,
errNo
:=
fcntl
(
p
.
r
.
Fd
(),
F_SETPIPE_SZ
,
n
)
if
errNo
!=
0
{
...
...
@@ -85,7 +85,7 @@ func (p *Pair) LoadFrom(fd uintptr, sz int) (int, error) {
func
(
p
*
Pair
)
WriteTo
(
fd
uintptr
,
n
int
)
(
int
,
error
)
{
m
,
err
:=
syscall
.
Splice
(
int
(
p
.
r
.
Fd
()),
nil
,
int
(
fd
),
nil
,
int
(
n
),
0
)
if
err
!=
nil
{
err
=
os
.
NewSyscallError
(
"Splice write
to:
"
,
err
)
err
=
os
.
NewSyscallError
(
"Splice write"
,
err
)
}
return
int
(
m
),
err
}
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