aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-02-11 03:12:52 -0800
committerchrislu <chris.lu@gmail.com>2022-02-11 03:12:52 -0800
commit45a0fda9bda7457db31f6134424d251ffac530f8 (patch)
treea5a0968ffd01c1e1c1380b208c15ebe242657542
parentf87da798a4e9f9d5e4e60966630c5ea1ff291d37 (diff)
downloadseaweedfs-45a0fda9bda7457db31f6134424d251ffac530f8.tar.xz
seaweedfs-45a0fda9bda7457db31f6134424d251ffac530f8.zip
need to follow https://github.com/hanwen/go-fuse/blob/master/fuse/api.go
-rw-r--r--weed/mount/weedfs.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/weed/mount/weedfs.go b/weed/mount/weedfs.go
index b2a64acb7..5f35d8112 100644
--- a/weed/mount/weedfs.go
+++ b/weed/mount/weedfs.go
@@ -7,6 +7,7 @@ import (
"github.com/chrislusf/seaweedfs/weed/storage/types"
"github.com/chrislusf/seaweedfs/weed/util"
"github.com/chrislusf/seaweedfs/weed/util/grace"
+ "github.com/hanwen/go-fuse/v2/fuse"
"google.golang.org/grpc"
"os"
"path"
@@ -49,6 +50,8 @@ type Option struct {
}
type WFS struct {
+ // follow https://github.com/hanwen/go-fuse/blob/master/fuse/api.go
+ fuse.RawFileSystem
fs.Inode
option *Option
metaCache *meta_cache.MetaCache
@@ -59,8 +62,9 @@ type WFS struct {
func NewSeaweedFileSystem(option *Option) *WFS {
wfs := &WFS{
- option: option,
- signature: util.RandomInt32(),
+ RawFileSystem: fuse.NewDefaultRawFileSystem(),
+ option: option,
+ signature: util.RandomInt32(),
}
wfs.root = Directory{