Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jacobsa-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
jacobsa-fuse
Commits
f0f62136
Commit
f0f62136
authored
Jul 16, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Killed the stale random delays feature.
parent
b44d3450
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
14 deletions
+0
-14
fuseutil/file_system.go
fuseutil/file_system.go
+0
-14
No files found.
fuseutil/file_system.go
View file @
f0f62136
...
...
@@ -15,20 +15,13 @@
package
fuseutil
import
(
"flag"
"io"
"math/rand"
"sync"
"time"
"github.com/jacobsa/fuse"
"github.com/jacobsa/fuse/fuseops"
)
var
fRandomDelays
=
flag
.
Bool
(
"fuseutil.random_delays"
,
false
,
"If set, randomly delay each op received, to help expose concurrency issues."
)
// An interface with a method for each op type in the fuseops package. This can
// be used in conjunction with NewFileSystemServer to avoid writing a "dispatch
// loop" that switches on op types, instead receiving typed method calls
...
...
@@ -115,13 +108,6 @@ func (s *fileSystemServer) ServeOps(c *fuse.Connection) {
func
(
s
*
fileSystemServer
)
handleOp
(
op
fuseops
.
Op
)
{
defer
s
.
opsInFlight
.
Done
()
// Delay if requested.
if
*
fRandomDelays
{
const
delayLimit
=
100
*
time
.
Microsecond
delay
:=
time
.
Duration
(
rand
.
Int63n
(
int64
(
delayLimit
)))
time
.
Sleep
(
delay
)
}
// Dispatch to the appropriate method.
var
err
error
switch
typed
:=
op
.
(
type
)
{
...
...
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