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
4cf05ec3
Commit
4cf05ec3
authored
Nov 30, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove MountPathFileSystem.
parent
5d8ba04f
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
29 additions
and
21 deletions
+29
-21
benchmark/stat_test.go
benchmark/stat_test.go
+2
-1
example/hello/main.go
example/hello/main.go
+2
-1
example/multizip/main.go
example/multizip/main.go
+2
-1
fuse/api.go
fuse/api.go
+6
-0
fuse/cache_test.go
fuse/cache_test.go
+2
-1
fuse/fsetattr_test.go
fuse/fsetattr_test.go
+2
-1
fuse/fuse.go
fuse/fuse.go
+0
-5
fuse/loopback_test.go
fuse/loopback_test.go
+2
-1
fuse/owner_test.go
fuse/owner_test.go
+2
-1
fuse/pathfs.go
fuse/pathfs.go
+0
-5
fuse/xattr_test.go
fuse/xattr_test.go
+2
-1
unionfs/autounion_test.go
unionfs/autounion_test.go
+3
-1
unionfs/unionfs_test.go
unionfs/unionfs_test.go
+2
-1
zipfs/multizip_test.go
zipfs/multizip_test.go
+2
-1
No files found.
benchmark/stat_test.go
View file @
4cf05ec3
...
...
@@ -72,7 +72,8 @@ func NewStatFs() *StatFs {
func
setupFs
(
fs
fuse
.
FileSystem
,
opts
*
fuse
.
FileSystemOptions
)
(
string
,
func
())
{
mountPoint
,
_
:=
ioutil
.
TempDir
(
""
,
"stat_test"
)
state
,
_
,
err
:=
fuse
.
MountPathFileSystem
(
mountPoint
,
fs
,
opts
)
nfs
:=
fuse
.
NewPathNodeFs
(
fs
,
nil
)
state
,
_
,
err
:=
fuse
.
MountNodeFileSystem
(
mountPoint
,
nfs
,
opts
)
if
err
!=
nil
{
panic
(
fmt
.
Sprintf
(
"cannot mount %v"
,
err
))
// ugh - benchmark has no error methods.
}
...
...
example/hello/main.go
View file @
4cf05ec3
...
...
@@ -52,7 +52,8 @@ func main() {
if
len
(
flag
.
Args
())
<
1
{
log
.
Fatal
(
"Usage:
\n
hello MOUNTPOINT"
)
}
state
,
_
,
err
:=
fuse
.
MountPathFileSystem
(
flag
.
Arg
(
0
),
&
HelloFs
{},
nil
)
nfs
:=
fuse
.
NewPathNodeFs
(
&
HelloFs
{},
nil
)
state
,
_
,
err
:=
fuse
.
MountNodeFileSystem
(
flag
.
Arg
(
0
),
nfs
,
nil
)
if
err
!=
nil
{
log
.
Fatal
(
"Mount fail: %v
\n
"
,
err
)
}
...
...
example/multizip/main.go
View file @
4cf05ec3
...
...
@@ -22,7 +22,8 @@ func main() {
}
fs
:=
zipfs
.
NewMultiZipFs
()
state
,
_
,
err
:=
fuse
.
MountPathFileSystem
(
flag
.
Arg
(
0
),
fs
,
nil
)
nfs
:=
fuse
.
NewPathNodeFs
(
fs
,
nil
)
state
,
_
,
err
:=
fuse
.
MountNodeFileSystem
(
flag
.
Arg
(
0
),
nfs
,
nil
)
if
err
!=
nil
{
fmt
.
Printf
(
"Mount fail: %v
\n
"
,
err
)
os
.
Exit
(
1
)
...
...
fuse/api.go
View file @
4cf05ec3
...
...
@@ -136,6 +136,12 @@ type FileSystem interface {
StatFs
(
name
string
)
*
StatfsOut
}
type
PathNodeFsOptions
struct
{
// If ClientInodes is set, use Inode returned from GetAttr to
// find hard-linked files.
ClientInodes
bool
}
// A File object should be returned from FileSystem.Open and
// FileSystem.Create. Include DefaultFile into the struct to inherit
// a default null implementation.
...
...
fuse/cache_test.go
View file @
4cf05ec3
...
...
@@ -122,7 +122,8 @@ func TestNonseekable(t *testing.T) {
dir
,
err
:=
ioutil
.
TempDir
(
""
,
"go-fuse"
)
CheckSuccess
(
err
)
defer
os
.
RemoveAll
(
dir
)
state
,
_
,
err
:=
MountPathFileSystem
(
dir
,
fs
,
nil
)
nfs
:=
NewPathNodeFs
(
fs
,
nil
)
state
,
_
,
err
:=
MountNodeFileSystem
(
dir
,
nfs
,
nil
)
CheckSuccess
(
err
)
state
.
Debug
=
VerboseTest
()
defer
state
.
Unmount
()
...
...
fuse/fsetattr_test.go
View file @
4cf05ec3
...
...
@@ -122,7 +122,8 @@ func NewFile() *MutableDataFile {
func
setupFAttrTest
(
t
*
testing
.
T
,
fs
FileSystem
)
(
dir
string
,
clean
func
())
{
dir
,
err
:=
ioutil
.
TempDir
(
""
,
"go-fuse"
)
CheckSuccess
(
err
)
state
,
_
,
err
:=
MountPathFileSystem
(
dir
,
fs
,
nil
)
nfs
:=
NewPathNodeFs
(
fs
,
nil
)
state
,
_
,
err
:=
MountNodeFileSystem
(
dir
,
nfs
,
nil
)
CheckSuccess
(
err
)
state
.
Debug
=
VerboseTest
()
...
...
fuse/fuse.go
View file @
4cf05ec3
...
...
@@ -13,8 +13,3 @@ func MountNodeFileSystem(mountpoint string, nodeFs NodeFileSystem, opts *FileSys
}
return
mountState
,
conn
,
nil
}
func
MountPathFileSystem
(
mountpoint
string
,
pathFs
FileSystem
,
opts
*
FileSystemOptions
)
(
*
MountState
,
*
FileSystemConnector
,
error
)
{
nfs
:=
NewPathNodeFs
(
pathFs
,
nil
)
return
MountNodeFileSystem
(
mountpoint
,
nfs
,
opts
)
}
fuse/loopback_test.go
View file @
4cf05ec3
...
...
@@ -757,7 +757,8 @@ func TestOriginalIsSymlink(t *testing.T) {
CheckSuccess
(
err
)
fs
:=
NewLoopbackFileSystem
(
link
)
state
,
_
,
err
:=
MountPathFileSystem
(
mnt
,
fs
,
nil
)
nfs
:=
NewPathNodeFs
(
fs
,
nil
)
state
,
_
,
err
:=
MountNodeFileSystem
(
mnt
,
nfs
,
nil
)
CheckSuccess
(
err
)
defer
state
.
Unmount
()
...
...
fuse/owner_test.go
View file @
4cf05ec3
...
...
@@ -29,7 +29,8 @@ func setupOwnerTest(opts *FileSystemOptions) (workdir string, cleanup func()) {
wd
,
err
:=
ioutil
.
TempDir
(
""
,
"go-fuse"
)
fs
:=
&
ownerFs
{}
state
,
_
,
err
:=
MountPathFileSystem
(
wd
,
fs
,
opts
)
nfs
:=
NewPathNodeFs
(
fs
,
nil
)
state
,
_
,
err
:=
MountNodeFileSystem
(
wd
,
nfs
,
opts
)
CheckSuccess
(
err
)
go
state
.
Loop
()
return
wd
,
func
()
{
...
...
fuse/pathfs.go
View file @
4cf05ec3
...
...
@@ -41,11 +41,6 @@ type PathNodeFs struct {
options
*
PathNodeFsOptions
}
type
PathNodeFsOptions
struct
{
// If ClientInodes is set, use Inode returned from GetAttr to
// find hard-linked files.
ClientInodes
bool
}
func
(
me
*
PathNodeFs
)
Mount
(
path
string
,
nodeFs
NodeFileSystem
,
opts
*
FileSystemOptions
)
Status
{
dir
,
name
:=
filepath
.
Split
(
path
)
...
...
fuse/xattr_test.go
View file @
4cf05ec3
...
...
@@ -98,7 +98,8 @@ func TestXAttrRead(t *testing.T) {
CheckSuccess
(
err
)
defer
os
.
RemoveAll
(
mountPoint
)
state
,
_
,
err
:=
MountPathFileSystem
(
mountPoint
,
xfs
,
nil
)
nfs
:=
NewPathNodeFs
(
xfs
,
nil
)
state
,
_
,
err
:=
MountNodeFileSystem
(
mountPoint
,
nfs
,
nil
)
CheckSuccess
(
err
)
state
.
Debug
=
VerboseTest
()
defer
state
.
Unmount
()
...
...
unionfs/autounion_test.go
View file @
4cf05ec3
...
...
@@ -42,7 +42,9 @@ func setup(t *testing.T) (workdir string, cleanup func()) {
WriteFile
(
wd
+
"/ro/file2"
,
"file2"
)
fs
:=
NewAutoUnionFs
(
wd
+
"/store"
,
testAOpts
)
state
,
conn
,
err
:=
fuse
.
MountPathFileSystem
(
wd
+
"/mnt"
,
fs
,
&
testAOpts
.
FileSystemOptions
)
nfs
:=
fuse
.
NewPathNodeFs
(
fs
,
nil
)
state
,
conn
,
err
:=
fuse
.
MountNodeFileSystem
(
wd
+
"/mnt"
,
nfs
,
&
testAOpts
.
FileSystemOptions
)
CheckSuccess
(
err
)
state
.
Debug
=
fuse
.
VerboseTest
()
conn
.
Debug
=
fuse
.
VerboseTest
()
...
...
unionfs/unionfs_test.go
View file @
4cf05ec3
...
...
@@ -876,7 +876,8 @@ func TestUnionFsDisappearing(t *testing.T) {
NegativeTimeout
:
entryTtl
,
}
state
,
_
,
err
:=
fuse
.
MountPathFileSystem
(
wd
+
"/mnt"
,
ufs
,
opts
)
nfs
:=
fuse
.
NewPathNodeFs
(
ufs
,
nil
)
state
,
_
,
err
:=
fuse
.
MountNodeFileSystem
(
wd
+
"/mnt"
,
nfs
,
opts
)
CheckSuccess
(
err
)
defer
state
.
Unmount
()
state
.
Debug
=
fuse
.
VerboseTest
()
...
...
zipfs/multizip_test.go
View file @
4cf05ec3
...
...
@@ -16,7 +16,8 @@ const testTtl = 0.1
func
setupMzfs
()
(
mountPoint
string
,
cleanup
func
())
{
fs
:=
NewMultiZipFs
()
mountPoint
,
_
=
ioutil
.
TempDir
(
""
,
""
)
state
,
_
,
err
:=
fuse
.
MountPathFileSystem
(
mountPoint
,
fs
,
&
fuse
.
FileSystemOptions
{
nfs
:=
fuse
.
NewPathNodeFs
(
fs
)
state
,
_
,
err
:=
fuse
.
MountNodeFileSystem
(
mountPoint
,
nfs
,
&
fuse
.
FileSystemOptions
{
EntryTimeout
:
testTtl
,
AttrTimeout
:
testTtl
,
NegativeTimeout
:
0.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