Switched to the jacobsa/bazilfuse fork of bazillion/fuse.
This is in preparation for using bazilfuse.SetOption for dealing with issue #1.geesefs-0-30-9
commit
69e2ba32b0
|
@ -17,7 +17,7 @@ package fuse
|
||||||
import (
|
import (
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
bazilfuse "bazil.org/fuse"
|
"github.com/jacobsa/bazilfuse"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -19,7 +19,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
bazilfuse "bazil.org/fuse"
|
"github.com/jacobsa/bazilfuse"
|
||||||
|
|
||||||
"golang.org/x/net/context"
|
"golang.org/x/net/context"
|
||||||
)
|
)
|
||||||
|
|
|
@ -17,7 +17,7 @@ package fuse
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
bazilfuse "bazil.org/fuse"
|
"github.com/jacobsa/bazilfuse"
|
||||||
"golang.org/x/net/context"
|
"golang.org/x/net/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -115,13 +115,22 @@ func (mfs *MountedFileSystem) mountAndServe(
|
||||||
close(mfs.joinStatusAvailable)
|
close(mfs.joinStatusAvailable)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Optional configuration accepted by Mount.
|
||||||
|
type MountConfig struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert to mount options to be passed to package bazilfuse.
|
||||||
|
func (c *MountConfig) bazilfuseOptions() (opts []bazilfuse.MountOption) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// Attempt to mount the supplied file system on the given directory.
|
// Attempt to mount the supplied file system on the given directory.
|
||||||
// mfs.WaitForReady() must be called to find out whether the mount was
|
// mfs.WaitForReady() must be called to find out whether the mount was
|
||||||
// successful.
|
// successful.
|
||||||
func Mount(
|
func Mount(
|
||||||
dir string,
|
dir string,
|
||||||
fs FileSystem,
|
fs FileSystem,
|
||||||
options ...bazilfuse.MountOption) (mfs *MountedFileSystem, err error) {
|
config *MountConfig) (mfs *MountedFileSystem, err error) {
|
||||||
// Create a server object.
|
// Create a server object.
|
||||||
server, err := newServer(fs)
|
server, err := newServer(fs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -136,7 +145,7 @@ func Mount(
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mount in the background.
|
// Mount in the background.
|
||||||
go mfs.mountAndServe(server, options)
|
go mfs.mountAndServe(server, config.bazilfuseOptions())
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ func (t *cachingFSTest) setUp(
|
||||||
AssertEq(nil, err)
|
AssertEq(nil, err)
|
||||||
|
|
||||||
// Mount it.
|
// Mount it.
|
||||||
t.mfs, err = fuse.Mount(t.dir, t.fs)
|
t.mfs, err = fuse.Mount(t.dir, t.fs, &fuse.MountConfig{})
|
||||||
AssertEq(nil, err)
|
AssertEq(nil, err)
|
||||||
|
|
||||||
err = t.mfs.WaitForReady(context.Background())
|
err = t.mfs.WaitForReady(context.Background())
|
||||||
|
|
|
@ -65,7 +65,7 @@ func (t *HelloFSTest) SetUp(ti *TestInfo) {
|
||||||
Clock: &t.clock,
|
Clock: &t.clock,
|
||||||
}
|
}
|
||||||
|
|
||||||
if t.mfs, err = fuse.Mount(mountPoint, fs); err != nil {
|
if t.mfs, err = fuse.Mount(mountPoint, fs, &fuse.MountConfig{}); err != nil {
|
||||||
panic("Mount: " + err.Error())
|
panic("Mount: " + err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,6 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
bazilfuse "bazil.org/fuse"
|
|
||||||
"github.com/jacobsa/fuse"
|
"github.com/jacobsa/fuse"
|
||||||
"github.com/jacobsa/fuse/fusetesting"
|
"github.com/jacobsa/fuse/fusetesting"
|
||||||
"github.com/jacobsa/fuse/samples/memfs"
|
"github.com/jacobsa/fuse/samples/memfs"
|
||||||
|
@ -114,11 +113,9 @@ func (t *MemFSTest) SetUp(ti *TestInfo) {
|
||||||
// Mount a file system.
|
// Mount a file system.
|
||||||
fs := memfs.NewMemFS(currentUid(), currentGid(), &t.clock)
|
fs := memfs.NewMemFS(currentUid(), currentGid(), &t.clock)
|
||||||
|
|
||||||
t.mfs, err = fuse.Mount(
|
// TODO(jacobsa): Add a default_permissions field to the config and use it
|
||||||
mountPoint,
|
// here.
|
||||||
fs,
|
t.mfs, err = fuse.Mount(mountPoint, fs, &fuse.MountConfig{})
|
||||||
bazilfuse.DefaultPermissions())
|
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic("Mount: " + err.Error())
|
panic("Mount: " + err.Error())
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ import (
|
||||||
|
|
||||||
"golang.org/x/net/context"
|
"golang.org/x/net/context"
|
||||||
|
|
||||||
bazilfuse "bazil.org/fuse"
|
"github.com/jacobsa/bazilfuse"
|
||||||
)
|
)
|
||||||
|
|
||||||
// An object that terminates one end of the userspace <-> FUSE VFS connection.
|
// An object that terminates one end of the userspace <-> FUSE VFS connection.
|
||||||
|
|
Loading…
Reference in New Issue