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
96c47482
Commit
96c47482
authored
Nov 22, 2012
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix raciness in MountState.kernelSettings access.
parent
3a2e2a0c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
fuse/mountstate.go
fuse/mountstate.go
+7
-3
fuse/opcode.go
fuse/opcode.go
+2
-0
No files found.
fuse/mountstate.go
View file @
96c47482
...
...
@@ -35,13 +35,13 @@ type MountState struct {
latencies
*
LatencyMap
opts
*
MountOptions
kernelSettings
raw
.
InitIn
reqMu
sync
.
Mutex
reqPool
[]
*
request
readPool
[][]
byte
reqReaders
int
outstandingReadBufs
int
kernelSettings
raw
.
InitIn
canSplice
bool
loops
sync
.
WaitGroup
...
...
@@ -66,7 +66,11 @@ func (ms *MountState) ThreadSanitizerSync() {
}
func
(
ms
*
MountState
)
KernelSettings
()
raw
.
InitIn
{
return
ms
.
kernelSettings
ms
.
reqMu
.
Lock
()
s
:=
ms
.
kernelSettings
ms
.
reqMu
.
Unlock
()
return
s
}
func
(
ms
*
MountState
)
MountPoint
()
string
{
...
...
@@ -153,7 +157,7 @@ func (ms *MountState) Unmount() (err error) {
if
err
==
nil
{
break
}
fmt
.
Fprintf
(
os
.
Stderr
,
"umount failed; retrying
\n
"
)
// Sleep for a bit. This is not pretty, but there is
// no way we can be certain that the kernel thinks all
...
...
fuse/opcode.go
View file @
96c47482
...
...
@@ -85,6 +85,7 @@ func doInit(state *MountState, req *request) {
return
}
state
.
reqMu
.
Lock
()
state
.
kernelSettings
=
*
input
state
.
kernelSettings
.
Flags
=
input
.
Flags
&
(
raw
.
CAP_ASYNC_READ
|
raw
.
CAP_BIG_WRITES
|
raw
.
CAP_FILE_OPS
)
if
input
.
Minor
>=
13
{
...
...
@@ -94,6 +95,7 @@ func doInit(state *MountState, req *request) {
state
.
opts
.
MaxWrite
=
maxW
}
}
state
.
reqMu
.
Unlock
()
out
:=
&
raw
.
InitOut
{
Major
:
FUSE_KERNEL_VERSION
,
...
...
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