SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
seems editing already working
Chris Lu849b6ec28d96
diff --git a/weed/filesys/file.go b/weed/filesys/file.goindex 55edaf515c..d7f0d6bc05 100644--- a/weed/filesys/file.go+++ b/weed/filesys/file.go@@ -77,7 +77,7 @@ func (file *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpfullPath := filepath.Join(file.dir.Path, file.Name)- glog.V(3).Infof("file open %v %+v", fullPath, req)+ glog.V(3).Infof("%v file open %+v", fullPath, req)return &FileHandle{wfs: file.wfs,@@ -96,7 +96,7 @@ func (file *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.Opfunc (file *File) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse.SetattrResponse) error {fullPath := filepath.Join(file.dir.Path, file.Name)- glog.V(3).Infof("file setattr %v %+v", fullPath, req)+ glog.V(3).Infof("%v file setattr %+v", fullPath, req)if req.Valid.Size() {if req.Size == 0 {@@ -128,7 +128,7 @@ func (file *File) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *ffunc (file *File) Fsync(ctx context.Context, req *fuse.FsyncRequest) error {// fsync works at OS level// write the file chunks to the filer- glog.V(3).Infof("fsync file %+v\n", req)+ glog.V(3).Infof("%s/%s fsync file %+v", file.dir.Path, file.Name, req)return nil}diff --git a/weed/filesys/filehandle.go b/weed/filesys/filehandle.goindex 5599f53a89..55d574342d 100644--- a/weed/filesys/filehandle.go+++ b/weed/filesys/filehandle.go@@ -41,7 +41,7 @@ var _ = fs.HandleReleaser(&FileHandle{})func (fh *FileHandle) ReadAll(ctx context.Context) (content []byte, err error) {- glog.V(3).Infof("read all fh %+v/%v", fh.dirPath, fh.name)+ glog.V(3).Infof("%v/%v read all fh ", fh.dirPath, fh.name)if len(fh.Chunks) == 0 {glog.V(0).Infof("empty fh %v/%v", fh.dirPath, fh.name)@@ -53,6 +53,9 @@ func (fh *FileHandle) ReadAll(ctx context.Context) (content []byte, err error) {// FIXME: need to either use Read() or implement differentlychunks, _ := filer2.CompactFileChunks(fh.Chunks)glog.V(1).Infof("read fh %v/%v %d/%d chunks", fh.dirPath, fh.name, len(chunks), len(fh.Chunks))+ for i, chunk := range chunks {+ glog.V(1).Infof("read fh %v/%v %d/%d chunk %s [%d,%d)", fh.dirPath, fh.name, i, len(chunks), chunk.FileId, chunk.Offset, chunk.Offset+int64(chunk.Size))+ }request := &filer_pb.GetFileContentRequest{FileId: chunks[0].FileId,}@@ -74,8 +77,10 @@ func (fh *FileHandle) ReadAll(ctx context.Context) (content []byte, err error) {// Write to the file handlefunc (fh *FileHandle) Write(ctx context.Context, req *fuse.WriteRequest, resp *fuse.WriteResponse) error {+// write the request to volume servers- // glog.V(3).Infof("write fh %+v", req)++ glog.V(3).Infof("%+v/%v write fh: %+v", fh.dirPath, fh.name, req)var fileId, host string@@ -128,7 +133,7 @@ func (fh *FileHandle) Write(ctx context.Context, req *fuse.WriteRequest, resp *ffunc (fh *FileHandle) Release(ctx context.Context, req *fuse.ReleaseRequest) error {- glog.V(3).Infof("release fh %+v/%v", fh.dirPath, fh.name)+ glog.V(3).Infof("%+v/%v release fh", fh.dirPath, fh.name)return nil}@@ -138,7 +143,7 @@ func (fh *FileHandle) Release(ctx context.Context, req *fuse.ReleaseRequest) errfunc (fh *FileHandle) Flush(ctx context.Context, req *fuse.FlushRequest) error {// fflush works at fh level// send the data to the OS- glog.V(3).Infof("fh flush %v", req)+ glog.V(3).Infof("%s/%s fh flush %v", fh.dirPath, fh.name, req)if !fh.dirty {return nil