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 (
|
||||
"syscall"
|
||||
|
||||
bazilfuse "bazil.org/fuse"
|
||||
"github.com/jacobsa/bazilfuse"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -19,7 +19,7 @@ import (
|
|||
"os"
|
||||
"time"
|
||||
|
||||
bazilfuse "bazil.org/fuse"
|
||||
"github.com/jacobsa/bazilfuse"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
|
|
@ -17,7 +17,7 @@ package fuse
|
|||
import (
|
||||
"errors"
|
||||
|
||||
bazilfuse "bazil.org/fuse"
|
||||
"github.com/jacobsa/bazilfuse"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
|
@ -115,13 +115,22 @@ func (mfs *MountedFileSystem) mountAndServe(
|
|||
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.
|
||||
// mfs.WaitForReady() must be called to find out whether the mount was
|
||||
// successful.
|
||||
func Mount(
|
||||
dir string,
|
||||
fs FileSystem,
|
||||
options ...bazilfuse.MountOption) (mfs *MountedFileSystem, err error) {
|
||||
config *MountConfig) (mfs *MountedFileSystem, err error) {
|
||||
// Create a server object.
|
||||
server, err := newServer(fs)
|
||||
if err != nil {
|
||||
|
@ -136,7 +145,7 @@ func Mount(
|
|||
}
|
||||
|
||||
// Mount in the background.
|
||||
go mfs.mountAndServe(server, options)
|
||||
go mfs.mountAndServe(server, config.bazilfuseOptions())
|
||||
|
||||
return
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ func (t *cachingFSTest) setUp(
|
|||
AssertEq(nil, err)
|
||||
|
||||
// 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)
|
||||
|
||||
err = t.mfs.WaitForReady(context.Background())
|
||||
|
|
|
@ -65,7 +65,7 @@ func (t *HelloFSTest) SetUp(ti *TestInfo) {
|
|||
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())
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
bazilfuse "bazil.org/fuse"
|
||||
"github.com/jacobsa/fuse"
|
||||
"github.com/jacobsa/fuse/fusetesting"
|
||||
"github.com/jacobsa/fuse/samples/memfs"
|
||||
|
@ -114,11 +113,9 @@ func (t *MemFSTest) SetUp(ti *TestInfo) {
|
|||
// Mount a file system.
|
||||
fs := memfs.NewMemFS(currentUid(), currentGid(), &t.clock)
|
||||
|
||||
t.mfs, err = fuse.Mount(
|
||||
mountPoint,
|
||||
fs,
|
||||
bazilfuse.DefaultPermissions())
|
||||
|
||||
// TODO(jacobsa): Add a default_permissions field to the config and use it
|
||||
// here.
|
||||
t.mfs, err = fuse.Mount(mountPoint, fs, &fuse.MountConfig{})
|
||||
if err != nil {
|
||||
panic("Mount: " + err.Error())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue