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
8c85ded1
Commit
8c85ded1
authored
Aug 12, 2014
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuse/nodefs: make critical section smaller for Utimens.
parent
b938fedf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
fuse/nodefs/files_darwin.go
fuse/nodefs/files_darwin.go
+1
-2
No files found.
fuse/nodefs/files_darwin.go
View file @
8c85ded1
...
@@ -11,8 +11,6 @@ import (
...
@@ -11,8 +11,6 @@ import (
func
(
f
*
loopbackFile
)
Allocate
(
off
uint64
,
sz
uint64
,
mode
uint32
)
fuse
.
Status
{
func
(
f
*
loopbackFile
)
Allocate
(
off
uint64
,
sz
uint64
,
mode
uint32
)
fuse
.
Status
{
// TODO: Handle `mode` parameter.
// TODO: Handle `mode` parameter.
f
.
lock
.
Lock
()
// From `man fcntl` on OSX:
// From `man fcntl` on OSX:
// The F_PREALLOCATE command operates on the following structure:
// The F_PREALLOCATE command operates on the following structure:
//
//
...
@@ -54,6 +52,7 @@ func (f *loopbackFile) Allocate(off uint64, sz uint64, mode uint32) fuse.Status
...
@@ -54,6 +52,7 @@ func (f *loopbackFile) Allocate(off uint64, sz uint64, mode uint32) fuse.Status
// Linux version for reference:
// Linux version for reference:
// err := syscall.Fallocate(int(f.File.Fd()), mode, int64(off), int64(sz))
// err := syscall.Fallocate(int(f.File.Fd()), mode, int64(off), int64(sz))
f
.
lock
.
Lock
()
_
,
_
,
errno
:=
syscall
.
Syscall
(
syscall
.
SYS_FCNTL
,
f
.
File
.
Fd
(),
uintptr
(
syscall
.
F_PREALLOCATE
),
uintptr
(
unsafe
.
Pointer
(
&
k
)))
_
,
_
,
errno
:=
syscall
.
Syscall
(
syscall
.
SYS_FCNTL
,
f
.
File
.
Fd
(),
uintptr
(
syscall
.
F_PREALLOCATE
),
uintptr
(
unsafe
.
Pointer
(
&
k
)))
f
.
lock
.
Unlock
()
f
.
lock
.
Unlock
()
if
errno
!=
0
{
if
errno
!=
0
{
...
...
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