aboutsummaryrefslogtreecommitdiff
path: root/weed/filesys/filehandle.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-08-06 10:04:17 -0700
committerChris Lu <chris.lu@gmail.com>2020-08-06 10:04:17 -0700
commit20e2ac1add0e93710d54f41c8ba142918c60d620 (patch)
tree4fadb3236551f8aab1037bc6f6ec5351f169fcea /weed/filesys/filehandle.go
parent93ea0801ea65375c16f148c9e77056e6c145f770 (diff)
downloadseaweedfs-20e2ac1add0e93710d54f41c8ba142918c60d620.tar.xz
seaweedfs-20e2ac1add0e93710d54f41c8ba142918c60d620.zip
filer: store md5 metadata for files uploaded by filer
fix https://github.com/chrislusf/seaweedfs/issues/1412
Diffstat (limited to 'weed/filesys/filehandle.go')
-rw-r--r--weed/filesys/filehandle.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/weed/filesys/filehandle.go b/weed/filesys/filehandle.go
index ca35bfd02..b9d224fb2 100644
--- a/weed/filesys/filehandle.go
+++ b/weed/filesys/filehandle.go
@@ -9,11 +9,12 @@ import (
"os"
"time"
+ "github.com/seaweedfs/fuse"
+ "github.com/seaweedfs/fuse/fs"
+
"github.com/chrislusf/seaweedfs/weed/filer2"
"github.com/chrislusf/seaweedfs/weed/glog"
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
- "github.com/seaweedfs/fuse"
- "github.com/seaweedfs/fuse/fs"
)
type FileHandle struct {
@@ -225,6 +226,10 @@ func (fh *FileHandle) Flush(ctx context.Context, req *fuse.FlushRequest) error {
fh.f.entry.Chunks = chunks
// fh.f.entryViewCache = nil
+ // special handling of one chunk md5
+ if len(chunks) == 1 {
+ }
+
if err := filer_pb.CreateEntry(client, request); err != nil {
glog.Errorf("fh flush create %s: %v", fh.f.fullpath(), err)
return fmt.Errorf("fh flush create %s: %v", fh.f.fullpath(), err)