diff options
Diffstat (limited to 'weed/filesys')
| -rw-r--r-- | weed/filesys/dirty_page.go | 2 | ||||
| -rw-r--r-- | weed/filesys/file.go | 6 | ||||
| -rw-r--r-- | weed/filesys/wfs.go | 10 |
3 files changed, 9 insertions, 9 deletions
diff --git a/weed/filesys/dirty_page.go b/weed/filesys/dirty_page.go index 996eb0abb..ca8c29b7a 100644 --- a/weed/filesys/dirty_page.go +++ b/weed/filesys/dirty_page.go @@ -133,7 +133,7 @@ func (pages *ContinuousDirtyPages) saveToStorage(ctx context.Context, buf []byte return nil }); err != nil { - return nil, fmt.Errorf("filer assign volume: %v", err) + return nil, fmt.Errorf("filerGrpcAddress assign volume: %v", err) } fileUrl := fmt.Sprintf("http://%s/%s", host, fileId) diff --git a/weed/filesys/file.go b/weed/filesys/file.go index 1fb7d53b1..625fd4f74 100644 --- a/weed/filesys/file.go +++ b/weed/filesys/file.go @@ -26,7 +26,7 @@ type File struct { isOpen bool } -func (file *File) Attr(context context.Context, attr *fuse.Attr) error { +func (file *File) Attr(ctx context.Context, attr *fuse.Attr) error { fullPath := filepath.Join(file.dir.Path, file.Name) @@ -45,7 +45,7 @@ func (file *File) Attr(context context.Context, attr *fuse.Attr) error { ParentDir: file.dir.Path, } - resp, err := client.GetEntryAttributes(context, request) + resp, err := client.GetEntryAttributes(ctx, request) if err != nil { glog.V(0).Infof("file attr read file %v: %v", request, err) return err @@ -129,7 +129,7 @@ func (file *File) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *f func (file *File) Fsync(ctx context.Context, req *fuse.FsyncRequest) error { // fsync works at OS level - // write the file chunks to the filer + // write the file chunks to the filerGrpcAddress glog.V(3).Infof("%s/%s fsync file %+v", file.dir.Path, file.Name, req) return nil diff --git a/weed/filesys/wfs.go b/weed/filesys/wfs.go index 4b9e20b95..ac7333695 100644 --- a/weed/filesys/wfs.go +++ b/weed/filesys/wfs.go @@ -9,16 +9,16 @@ import ( ) type WFS struct { - filer string + filerGrpcAddress string listDirectoryEntriesCache *ccache.Cache collection string replication string chunkSizeLimit int64 } -func NewSeaweedFileSystem(filer string, collection string, replication string, chunkSizeLimitMB int) *WFS { +func NewSeaweedFileSystem(filerGrpcAddress string, collection string, replication string, chunkSizeLimitMB int) *WFS { return &WFS{ - filer: filer, + filerGrpcAddress: filerGrpcAddress, listDirectoryEntriesCache: ccache.New(ccache.Configure().MaxSize(6000).ItemsToPrune(100)), collection: collection, replication: replication, @@ -32,9 +32,9 @@ func (wfs *WFS) Root() (fs.Node, error) { func (wfs *WFS) withFilerClient(fn func(filer_pb.SeaweedFilerClient) error) error { - grpcConnection, err := grpc.Dial(wfs.filer, grpc.WithInsecure()) + grpcConnection, err := grpc.Dial(wfs.filerGrpcAddress, grpc.WithInsecure()) if err != nil { - return fmt.Errorf("fail to dial %s: %v", wfs.filer, err) + return fmt.Errorf("fail to dial %s: %v", wfs.filerGrpcAddress, err) } defer grpcConnection.Close() |
