diff options
| author | Chris Lu <chris.lu@uber.com> | 2019-03-15 17:20:24 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@uber.com> | 2019-03-15 17:20:24 -0700 |
| commit | 55bab1b456c3c13a8009a11730e678ca0c48dfb0 (patch) | |
| tree | c7609b465c8444fc7538cb7f9392011840e1b38c /weed/filesys/filehandle.go | |
| parent | cece860bfde443d4f8cddb04b10fb98a998995ed (diff) | |
| download | seaweedfs-55bab1b456c3c13a8009a11730e678ca0c48dfb0.tar.xz seaweedfs-55bab1b456c3c13a8009a11730e678ca0c48dfb0.zip | |
add context.Context
Diffstat (limited to 'weed/filesys/filehandle.go')
| -rw-r--r-- | weed/filesys/filehandle.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/filesys/filehandle.go b/weed/filesys/filehandle.go index 3bca0e22e..2c2e041e7 100644 --- a/weed/filesys/filehandle.go +++ b/weed/filesys/filehandle.go @@ -73,7 +73,7 @@ func (fh *FileHandle) Read(ctx context.Context, req *fuse.ReadRequest, resp *fus vid2Locations := make(map[string]*filer_pb.Locations) - err := fh.f.wfs.withFilerClient(func(client filer_pb.SeaweedFilerClient) error { + err := fh.f.wfs.withFilerClient(ctx, func(client filer_pb.SeaweedFilerClient) error { glog.V(4).Infof("read fh lookup volume id locations: %v", vids) resp, err := client.LookupVolume(ctx, &filer_pb.LookupVolumeRequest{ @@ -197,7 +197,7 @@ func (fh *FileHandle) Flush(ctx context.Context, req *fuse.FlushRequest) error { return nil } - return fh.f.wfs.withFilerClient(func(client filer_pb.SeaweedFilerClient) error { + return fh.f.wfs.withFilerClient(ctx, func(client filer_pb.SeaweedFilerClient) error { if fh.f.entry.Attributes != nil { fh.f.entry.Attributes.Mime = fh.contentType @@ -221,7 +221,7 @@ func (fh *FileHandle) Flush(ctx context.Context, req *fuse.FlushRequest) error { chunks, garbages := filer2.CompactFileChunks(fh.f.entry.Chunks) fh.f.entry.Chunks = chunks // fh.f.entryViewCache = nil - fh.f.wfs.deleteFileChunks(garbages) + fh.f.wfs.deleteFileChunks(ctx, garbages) if _, err := client.CreateEntry(ctx, request); err != nil { return fmt.Errorf("update fh: %v", err) |
