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
0776cb0f
Commit
0776cb0f
authored
Sep 12, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop the argument to Loop. Go-FUSE is always threaded.
parent
06650baf
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
23 additions
and
27 deletions
+23
-27
benchmark/stat_test.go
benchmark/stat_test.go
+1
-1
example/autounionfs/main.go
example/autounionfs/main.go
+1
-2
example/hello/hello.go
example/hello/hello.go
+1
-1
example/loopback/loopback.go
example/loopback/loopback.go
+1
-2
example/multizip/main.go
example/multizip/main.go
+1
-1
example/unionfs/main.go
example/unionfs/main.go
+1
-2
example/zipfs/main.go
example/zipfs/main.go
+1
-1
fuse/cache_test.go
fuse/cache_test.go
+2
-2
fuse/fsetattr_test.go
fuse/fsetattr_test.go
+1
-1
fuse/loopback_test.go
fuse/loopback_test.go
+2
-2
fuse/mountstate.go
fuse/mountstate.go
+2
-3
fuse/notify_test.go
fuse/notify_test.go
+1
-1
fuse/owner_test.go
fuse/owner_test.go
+1
-1
fuse/pathdebug_test.go
fuse/pathdebug_test.go
+1
-1
fuse/xattr_test.go
fuse/xattr_test.go
+1
-1
unionfs/autounion_test.go
unionfs/autounion_test.go
+1
-1
unionfs/unionfs_test.go
unionfs/unionfs_test.go
+2
-2
zipfs/multizip_test.go
zipfs/multizip_test.go
+1
-1
zipfs/zipfs_test.go
zipfs/zipfs_test.go
+1
-1
No files found.
benchmark/stat_test.go
View file @
0776cb0f
...
...
@@ -77,7 +77,7 @@ func setupFs(fs fuse.FileSystem, opts *fuse.FileSystemOptions) (string, func())
panic
(
fmt
.
Sprintf
(
"cannot mount %v"
,
err
))
// ugh - benchmark has no error methods.
}
// state.Debug = true
go
state
.
Loop
(
false
)
go
state
.
Loop
()
return
mountPoint
,
func
()
{
err
:=
state
.
Unmount
()
...
...
example/autounionfs/main.go
View file @
0776cb0f
...
...
@@ -11,7 +11,6 @@ import (
func
main
()
{
version
:=
flag
.
Bool
(
"version"
,
false
,
"print version number"
)
debug
:=
flag
.
Bool
(
"debug"
,
false
,
"debug on"
)
threaded
:=
flag
.
Bool
(
"threaded"
,
true
,
"threading on"
)
delcache_ttl
:=
flag
.
Float64
(
"deletion_cache_ttl"
,
5.0
,
"Deletion cache TTL in seconds."
)
branchcache_ttl
:=
flag
.
Float64
(
"branchcache_ttl"
,
5.0
,
"Branch cache TTL in seconds."
)
deldirname
:=
flag
.
String
(
...
...
@@ -54,5 +53,5 @@ func main() {
pathfs
.
Debug
=
*
debug
conn
.
Debug
=
*
debug
state
.
Debug
=
*
debug
state
.
Loop
(
*
threaded
)
state
.
Loop
()
}
example/hello/hello.go
View file @
0776cb0f
...
...
@@ -56,5 +56,5 @@ func main() {
if
err
!=
nil
{
log
.
Fatal
(
"Mount fail: %v
\n
"
,
err
)
}
state
.
Loop
(
true
)
state
.
Loop
()
}
example/loopback/loopback.go
View file @
0776cb0f
...
...
@@ -19,7 +19,6 @@ func main() {
// Scans the arg list and sets up flags
debug
:=
flag
.
Bool
(
"debug"
,
false
,
"print debugging messages."
)
latencies
:=
flag
.
Bool
(
"latencies"
,
false
,
"record latencies."
)
threaded
:=
flag
.
Bool
(
"threaded"
,
true
,
"switch off threading; print debugging messages."
)
flag
.
Parse
()
if
flag
.
NArg
()
<
2
{
// TODO - where to get program name?
...
...
@@ -77,5 +76,5 @@ func main() {
}
fmt
.
Println
(
"Mounted!"
)
state
.
Loop
(
*
threaded
)
state
.
Loop
()
}
example/multizip/main.go
View file @
0776cb0f
...
...
@@ -29,5 +29,5 @@ func main() {
}
state
.
Debug
=
*
debug
state
.
Loop
(
true
)
state
.
Loop
()
}
example/unionfs/main.go
View file @
0776cb0f
...
...
@@ -11,7 +11,6 @@ import (
func
main
()
{
debug
:=
flag
.
Bool
(
"debug"
,
false
,
"debug on"
)
threaded
:=
flag
.
Bool
(
"threaded"
,
true
,
"debug on"
)
delcache_ttl
:=
flag
.
Float64
(
"deletion_cache_ttl"
,
5.0
,
"Deletion cache TTL in seconds."
)
branchcache_ttl
:=
flag
.
Float64
(
"branchcache_ttl"
,
5.0
,
"Branch cache TTL in seconds."
)
deldirname
:=
flag
.
String
(
...
...
@@ -40,5 +39,5 @@ func main() {
}
mountState
.
Debug
=
*
debug
mountState
.
Loop
(
*
threaded
)
mountState
.
Loop
()
}
example/zipfs/main.go
View file @
0776cb0f
...
...
@@ -37,5 +37,5 @@ func main() {
state
.
SetRecordStatistics
(
*
latencies
)
state
.
Debug
=
*
debug
state
.
Loop
(
true
)
state
.
Loop
()
}
fuse/cache_test.go
View file @
0776cb0f
...
...
@@ -40,7 +40,7 @@ func setupCacheTest() (string, *PathNodeFs, func()) {
state
.
Debug
=
true
conn
.
Debug
=
true
pfs
.
Debug
=
true
go
state
.
Loop
(
false
)
go
state
.
Loop
()
return
dir
,
pfs
,
func
()
{
err
:=
state
.
Unmount
()
...
...
@@ -124,7 +124,7 @@ func TestNonseekable(t *testing.T) {
state
.
Debug
=
true
defer
state
.
Unmount
()
go
state
.
Loop
(
false
)
go
state
.
Loop
()
f
,
err
:=
os
.
Open
(
dir
+
"/file"
)
CheckSuccess
(
err
)
...
...
fuse/fsetattr_test.go
View file @
0776cb0f
...
...
@@ -126,7 +126,7 @@ func setupFAttrTest(fs FileSystem) (dir string, clean func()) {
CheckSuccess
(
err
)
state
.
Debug
=
true
go
state
.
Loop
(
false
)
go
state
.
Loop
()
// Trigger INIT.
os
.
Lstat
(
dir
)
...
...
fuse/loopback_test.go
View file @
0776cb0f
...
...
@@ -88,7 +88,7 @@ func NewTestCase(t *testing.T) *testCase {
me
.
state
.
Debug
=
true
// Unthreaded, but in background.
go
me
.
state
.
Loop
(
false
)
go
me
.
state
.
Loop
()
return
me
}
...
...
@@ -707,7 +707,7 @@ func TestOriginalIsSymlink(t *testing.T) {
CheckSuccess
(
err
)
defer
state
.
Unmount
()
go
state
.
Loop
(
false
)
go
state
.
Loop
()
_
,
err
=
os
.
Lstat
(
mnt
)
CheckSuccess
(
err
)
...
...
fuse/mountstate.go
View file @
0776cb0f
...
...
@@ -153,9 +153,8 @@ func (me *MountState) recordStats(req *request) {
// and wait for it to exit, but tests will want to run this in a
// goroutine.
//
// If threaded is given, each filesystem operation executes in a
// separate goroutine.
func
(
me
*
MountState
)
Loop
(
unused
bool
)
{
// Each filesystem operation executes in a separate goroutine.
func
(
me
*
MountState
)
Loop
()
{
me
.
loop
()
me
.
mountFile
.
Close
()
}
...
...
fuse/notify_test.go
View file @
0776cb0f
...
...
@@ -55,7 +55,7 @@ func NewNotifyTest() *NotifyTest {
me
.
state
,
me
.
connector
,
err
=
MountNodeFileSystem
(
me
.
dir
,
me
.
pathfs
,
opts
)
CheckSuccess
(
err
)
me
.
state
.
Debug
=
true
go
me
.
state
.
Loop
(
false
)
go
me
.
state
.
Loop
()
return
me
}
...
...
fuse/owner_test.go
View file @
0776cb0f
...
...
@@ -30,7 +30,7 @@ func setupOwnerTest(opts *FileSystemOptions) (workdir string, cleanup func()) {
fs
:=
&
ownerFs
{}
state
,
_
,
err
:=
MountPathFileSystem
(
wd
,
fs
,
opts
)
CheckSuccess
(
err
)
go
state
.
Loop
(
false
)
go
state
.
Loop
()
return
wd
,
func
()
{
state
.
Unmount
()
os
.
RemoveAll
(
wd
)
...
...
fuse/pathdebug_test.go
View file @
0776cb0f
...
...
@@ -21,7 +21,7 @@ func TestPathDebug(t *testing.T) {
state
.
Debug
=
true
defer
state
.
Unmount
()
go
state
.
Loop
(
false
)
go
state
.
Loop
()
dir
:=
filepath
.
Join
(
mountPoint
,
".debug"
)
_
,
err
:=
os
.
Lstat
(
dir
)
...
...
fuse/xattr_test.go
View file @
0776cb0f
...
...
@@ -99,7 +99,7 @@ func TestXAttrRead(t *testing.T) {
state
.
Debug
=
true
defer
state
.
Unmount
()
go
state
.
Loop
(
false
)
go
state
.
Loop
()
mounted
:=
filepath
.
Join
(
mountPoint
,
nm
)
_
,
err
=
os
.
Lstat
(
mounted
)
...
...
unionfs/autounion_test.go
View file @
0776cb0f
...
...
@@ -46,7 +46,7 @@ func setup(t *testing.T) (workdir string, cleanup func()) {
CheckSuccess
(
err
)
state
.
Debug
=
true
conn
.
Debug
=
true
go
state
.
Loop
(
false
)
go
state
.
Loop
()
return
wd
,
func
()
{
state
.
Unmount
()
...
...
unionfs/unionfs_test.go
View file @
0776cb0f
...
...
@@ -58,7 +58,7 @@ func setupUfs(t *testing.T) (workdir string, cleanup func()) {
CheckSuccess
(
err
)
conn
.
Debug
=
true
state
.
Debug
=
true
go
state
.
Loop
(
false
)
go
state
.
Loop
()
return
wd
,
func
()
{
state
.
Unmount
()
...
...
@@ -851,7 +851,7 @@ func TestDisappearing(t *testing.T) {
CheckSuccess
(
err
)
defer
state
.
Unmount
()
state
.
Debug
=
true
go
state
.
Loop
(
true
)
go
state
.
Loop
()
log
.
Println
(
"TestDisappearing2"
)
...
...
zipfs/multizip_test.go
View file @
0776cb0f
...
...
@@ -23,7 +23,7 @@ func setupMzfs() (mountPoint string, cleanup func()) {
})
CheckSuccess
(
err
)
state
.
Debug
=
true
go
state
.
Loop
(
true
)
go
state
.
Loop
()
return
mountPoint
,
func
()
{
state
.
Unmount
()
...
...
zipfs/zipfs_test.go
View file @
0776cb0f
...
...
@@ -27,7 +27,7 @@ func setupZipfs() (mountPoint string, cleanup func()) {
state
,
_
,
err
:=
fuse
.
MountNodeFileSystem
(
mountPoint
,
zfs
,
nil
)
state
.
Debug
=
true
go
state
.
Loop
(
false
)
go
state
.
Loop
()
return
mountPoint
,
func
()
{
state
.
Unmount
()
...
...
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