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
mount: modify file size
Chris Lu6a40c688e00d
diff --git a/weed/filesys/file.go b/weed/filesys/file.goindex b0df344fac..ca0550a87a 100644--- a/weed/filesys/file.go+++ b/weed/filesys/file.go@@ -50,6 +50,10 @@ func (file *File) Attr(ctx context.Context, attr *fuse.Attr) error {attr.Inode = uint64(util.HashStringToLong(file.fullpath()))attr.Mode = os.FileMode(file.entry.Attributes.FileMode)attr.Size = filer2.TotalSize(file.entry.Chunks)+ if file.isOpen {+ attr.Size = file.entry.Attributes.FileSize+ }+ attr.Crtime = time.Unix(file.entry.Attributes.Crtime, 0)attr.Mtime = time.Unix(file.entry.Attributes.Mtime, 0)attr.Gid = file.entry.Attributes.Gidattr.Uid = file.entry.Attributes.Uid