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: fix symlink size reporting
chrisluf401b996eb42
diff --git a/weed/mount/weedfs_attr.go b/weed/mount/weedfs_attr.goindex e31c170cbf..dc7a3bc85f 100644--- a/weed/mount/weedfs_attr.go+++ b/weed/mount/weedfs_attr.go@@ -143,6 +143,9 @@ func (wfs *WFS) setAttrByPbEntry(out *fuse.Attr, inode uint64, entry *filer_pb.Eout.Ino = entry.Attributes.Inode}out.Size = filer.FileSize(entry)+ if entry.FileMode()&os.ModeSymlink != 0 {+ out.Size = uint64(len(entry.Attributes.SymlinkTarget))+ }out.Blocks = (out.Size + blockSize - 1) / blockSizesetBlksize(out, blockSize)if entry == nil {@@ -165,6 +168,9 @@ func (wfs *WFS) setAttrByPbEntry(out *fuse.Attr, inode uint64, entry *filer_pb.Efunc (wfs *WFS) setAttrByFilerEntry(out *fuse.Attr, inode uint64, entry *filer.Entry) {out.Ino = inodeout.Size = entry.FileSize+ if entry.Mode&os.ModeSymlink != 0 {+ out.Size = uint64(len(entry.SymlinkTarget))+ }out.Blocks = (out.Size + blockSize - 1) / blockSizesetBlksize(out, blockSize)out.Atime = uint64(entry.Attr.Mtime.Unix())